source: webkit/trunk/JavaScriptCore/runtime/JSWrapperObject.h@ 45683

Last change on this file since 45683 was 43153, checked in by [email protected], 16 years ago

JavaScriptCore:

2009-05-02 Geoffrey Garen <[email protected]>

Reviewed by Sam Weinig.

Simplified null-ish JSValues.


Replaced calls to noValue() with calls to JSValue() (which is what
noValue() returned). Removed noValue().


Replaced almost all uses of jsImpossibleValue() with uses of JSValue().
Its one remaining use is for construction of hash table deleted values.
For that specific task, I made a new, private constructor with a special
tag. Removed jsImpossibleValue().


Removed "JSValue()" initialiazers, since default construction happens...
by default.

  • API/JSCallbackObjectFunctions.h: (JSC::::call):
  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitLoad):
  • bytecompiler/BytecodeGenerator.h:
  • debugger/DebuggerCallFrame.cpp: (JSC::DebuggerCallFrame::evaluate):
  • debugger/DebuggerCallFrame.h: (JSC::DebuggerCallFrame::DebuggerCallFrame):
  • interpreter/CallFrame.h: (JSC::ExecState::clearException):
  • interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): (JSC::Interpreter::retrieveLastCaller):
  • interpreter/Register.h: (JSC::Register::Register):
  • jit/JITCall.cpp: (JSC::JIT::unlinkCall): (JSC::JIT::compileOpCallInitializeCallFrame): (JSC::JIT::compileOpCall):
  • jit/JITStubs.cpp: (JSC::JITStubs::cti_op_call_eval): (JSC::JITStubs::cti_vm_throw):
  • profiler/Profiler.cpp: (JSC::Profiler::willExecute): (JSC::Profiler::didExecute):
  • runtime/ArrayPrototype.cpp: (JSC::getProperty):
  • runtime/Completion.cpp: (JSC::evaluate):
  • runtime/Completion.h: (JSC::Completion::Completion):
  • runtime/GetterSetter.cpp: (JSC::GetterSetter::getPrimitiveNumber):
  • runtime/JSArray.cpp: (JSC::JSArray::putSlowCase): (JSC::JSArray::deleteProperty): (JSC::JSArray::increaseVectorLength): (JSC::JSArray::setLength): (JSC::JSArray::pop): (JSC::JSArray::sort): (JSC::JSArray::compactForSorting):
  • runtime/JSCell.cpp: (JSC::JSCell::getJSNumber):
  • runtime/JSCell.h: (JSC::JSValue::getJSNumber):
  • runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData):
  • runtime/JSImmediate.h: (JSC::JSImmediate::fromNumberOutsideIntegerRange): (JSC::JSImmediate::from):
  • runtime/JSNumberCell.cpp: (JSC::jsNumberCell):
  • runtime/JSObject.cpp: (JSC::callDefaultValueFunction):
  • runtime/JSObject.h: (JSC::JSObject::getDirect):
  • runtime/JSPropertyNameIterator.cpp: (JSC::JSPropertyNameIterator::toPrimitive):
  • runtime/JSPropertyNameIterator.h: (JSC::JSPropertyNameIterator::next):
  • runtime/JSValue.h: (JSC::JSValue::): (JSC::JSValueHashTraits::constructDeletedValue): (JSC::JSValueHashTraits::isDeletedValue): (JSC::JSValue::JSValue):
  • runtime/JSWrapperObject.h: (JSC::JSWrapperObject::JSWrapperObject):
  • runtime/Operations.h: (JSC::resolveBase):
  • runtime/PropertySlot.h: (JSC::PropertySlot::clearBase): (JSC::PropertySlot::clearValue):

WebCore:

2009-05-02 Geoffrey Garen <[email protected]>

Reviewed by Sam Weinig.

Simplified null-ish JSValues.


Replaced calls to noValue() with calls to JSValue() (which is what
noValue() returned). Removed noValue().


Removed "JSValue()" initialiazers, since default construction happens...
by default.

  • bindings/js/JSDOMBinding.cpp: (WebCore::setDOMException):
  • bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::open): (WebCore::JSDOMWindow::showModalDialog):
  • bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent):
  • bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::evaluate):
  • bindings/js/JSSQLResultSetRowListCustom.cpp: (WebCore::JSSQLResultSetRowList::item):
  • bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluate):
  • bindings/js/ScriptValue.h: (WebCore::ScriptValue::ScriptValue): (WebCore::ScriptValue::hasNoValue):
  • bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate):
  • bridge/jni/jni_instance.cpp: (JavaInstance::invokeMethod):
  • bridge/jni/jni_runtime.cpp: (JavaField::dispatchValueFromInstance): (JavaField::dispatchSetValueToInstance):
  • bridge/runtime.h: (JSC::Bindings::Instance::invokeConstruct):

WebKit/mac:

2009-05-02 Geoffrey Garen <[email protected]>

Reviewed by Sam Weinig.

Simplified null-ish JSValues.


Replaced calls to noValue() with calls to JSValue() (which is what
noValue() returned). Removed noValue().


Removed "JSValue()" initialiazers, since default construction happens...
by default.

  • WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame evaluateWebScript:]):
  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1/*
2 * Copyright (C) 2006 Maks Orlovich
3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 *
20 */
21
22#ifndef JSWrapperObject_h
23#define JSWrapperObject_h
24
25#include "JSObject.h"
26
27namespace JSC {
28
29 // This class is used as a base for classes such as String,
30 // Number, Boolean and Date which are wrappers for primitive types.
31 class JSWrapperObject : public JSObject {
32 protected:
33 explicit JSWrapperObject(PassRefPtr<Structure>);
34
35 public:
36 JSValue internalValue() const { return m_internalValue; }
37 void setInternalValue(JSValue);
38
39 virtual void mark();
40
41 private:
42 JSValue m_internalValue;
43 };
44
45 inline JSWrapperObject::JSWrapperObject(PassRefPtr<Structure> structure)
46 : JSObject(structure)
47 {
48 }
49
50 inline void JSWrapperObject::setInternalValue(JSValue value)
51 {
52 ASSERT(value);
53 ASSERT(!value.isObject());
54 m_internalValue = value;
55 }
56
57} // namespace JSC
58
59#endif // JSWrapperObject_h
Note: See TracBrowser for help on using the repository browser.