Revision: 7439
Author: [email protected]
Date: Wed Mar 30 07:17:39 2011
Log: Clean up runtime functions.
Make all functions called from generated code declared using
RUNTIME_FUNCTION macro. This makes them all look consistent and allows
experimenting with various calling conventions.
Review URL: http://codereview.chromium.org/6756029
http://code.google.com/p/v8/source/detail?r=7439
Modified:
/branches/bleeding_edge/src/arguments.h
/branches/bleeding_edge/src/assembler.cc
/branches/bleeding_edge/src/debug.cc
/branches/bleeding_edge/src/debug.h
/branches/bleeding_edge/src/ic.cc
/branches/bleeding_edge/src/runtime.cc
/branches/bleeding_edge/src/stub-cache.cc
/branches/bleeding_edge/src/stub-cache.h
=======================================
--- /branches/bleeding_edge/src/arguments.h Fri Mar 18 13:35:07 2011
+++ /branches/bleeding_edge/src/arguments.h Wed Mar 30 07:17:39 2011
@@ -99,8 +99,17 @@
Object* values_[3];
};
-#define RUNTIME_CALLING_CONVENTION Arguments args, Isolate* isolate
-#define RUNTIME_GET_ISOLATE ASSERT(isolate == Isolate::Current())
+
+#define DECLARE_RUNTIME_FUNCTION(Type, Name) \
+Type Name(Arguments args, Isolate* isolate)
+
+
+#define RUNTIME_FUNCTION(Type, Name) \
+Type Name(Arguments args, Isolate* isolate)
+
+
+#define RUNTIME_ARGUMENTS(isolate, args) args, isolate
+
} } // namespace v8::internal
=======================================
--- /branches/bleeding_edge/src/assembler.cc Mon Mar 28 06:05:36 2011
+++ /branches/bleeding_edge/src/assembler.cc Wed Mar 30 07:17:39 2011
@@ -1002,7 +1002,7 @@
#ifdef ENABLE_DEBUGGER_SUPPORT
ExternalReference ExternalReference::debug_break(Isolate* isolate) {
- return ExternalReference(Redirect(isolate, FUNCTION_ADDR(Debug::Break)));
+ return ExternalReference(Redirect(isolate, FUNCTION_ADDR(Debug_Break)));
}
=======================================
--- /branches/bleeding_edge/src/debug.cc Tue Mar 29 07:00:41 2011
+++ /branches/bleeding_edge/src/debug.cc Wed Mar 30 07:17:39 2011
@@ -917,24 +917,20 @@
}
-// This remains a static method so that generated code can call it.
-Object* Debug::Break(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
-
- Debug* debug = isolate->debug();
- Heap* heap = isolate->heap();
- HandleScope scope(isolate);
+Object* Debug::Break(Arguments args) {
+ Heap* heap = isolate_->heap();
+ HandleScope scope(isolate_);
ASSERT(args.length() == 0);
- debug->thread_local_.frame_drop_mode_ = FRAMES_UNTOUCHED;
+ thread_local_.frame_drop_mode_ = FRAMES_UNTOUCHED;
// Get the top-most JavaScript frame.
JavaScriptFrameIterator it;
JavaScriptFrame* frame = it.frame();
// Just continue if breaks are disabled or debugger cannot be loaded.
- if (debug->disable_break() || !debug->Load()) {
- debug->SetAfterBreakTarget(frame);
+ if (disable_break() || !Load()) {
+ SetAfterBreakTarget(frame);
return heap->undefined_value();
}
@@ -945,7 +941,7 @@
}
// Postpone interrupt during breakpoint processing.
- PostponeInterruptsScope postpone(isolate);
+ PostponeInterruptsScope postpone(isolate_);
// Get the debug info (create it if it does not exist).
Handle<SharedFunctionInfo> shared =
@@ -958,10 +954,10 @@
break_location_iterator.FindBreakLocationFromAddress(frame->pc());
// Check whether step next reached a new statement.
- if (!debug->StepNextContinue(&break_location_iterator, frame)) {
+ if (!StepNextContinue(&break_location_iterator, frame)) {
// Decrease steps left if performing multiple steps.
- if (debug->thread_local_.step_count_ > 0) {
- debug->thread_local_.step_count_--;
+ if (thread_local_.step_count_ > 0) {
+ thread_local_.step_count_--;
}
}
@@ -971,56 +967,55 @@
if (break_location_iterator.HasBreakPoint()) {
Handle<Object> break_point_objects =
Handle<Object>(break_location_iterator.BreakPointObjects());
- break_points_hit = debug->CheckBreakPoints(break_point_objects);
+ break_points_hit = CheckBreakPoints(break_point_objects);
}
// If step out is active skip everything until the frame where we need
to step
// out to is reached, unless real breakpoint is hit.
- if (debug->StepOutActive() && frame->fp() != debug->step_out_fp() &&
+ if (StepOutActive() && frame->fp() != step_out_fp() &&
break_points_hit->IsUndefined() ) {
// Step count should always be 0 for StepOut.
- ASSERT(debug->thread_local_.step_count_ == 0);
+ ASSERT(thread_local_.step_count_ == 0);
} else if (!break_points_hit->IsUndefined() ||
- (debug->thread_local_.last_step_action_ != StepNone &&
- debug->thread_local_.step_count_ == 0)) {
+ (thread_local_.last_step_action_ != StepNone &&
+ thread_local_.step_count_ == 0)) {
// Notify debugger if a real break point is triggered or if performing
// single stepping with no more steps to perform. Otherwise do another
step.
// Clear all current stepping setup.
- debug->ClearStepping();
+ ClearStepping();
// Notify the debug event listeners.
- isolate->debugger()->OnDebugBreak(break_points_hit, false);
- } else if (debug->thread_local_.last_step_action_ != StepNone) {
+ isolate_->debugger()->OnDebugBreak(break_points_hit, false);
+ } else if (thread_local_.last_step_action_ != StepNone) {
// Hold on to last step action as it is cleared by the call to
// ClearStepping.
- StepAction step_action = debug->thread_local_.last_step_action_;
- int step_count = debug->thread_local_.step_count_;
+ StepAction step_action = thread_local_.last_step_action_;
+ int step_count = thread_local_.step_count_;
// Clear all current stepping setup.
- debug->ClearStepping();
+ ClearStepping();
// Set up for the remaining steps.
- debug->PrepareStep(step_action, step_count);
+ PrepareStep(step_action, step_count);
}
- if (debug->thread_local_.frame_drop_mode_ == FRAMES_UNTOUCHED) {
- debug->SetAfterBreakTarget(frame);
- } else if (debug->thread_local_.frame_drop_mode_ ==
+ if (thread_local_.frame_drop_mode_ == FRAMES_UNTOUCHED) {
+ SetAfterBreakTarget(frame);
+ } else if (thread_local_.frame_drop_mode_ ==
FRAME_DROPPED_IN_IC_CALL) {
// We must have been calling IC stub. Do not go there anymore.
- Code* plain_return =
- Isolate::Current()->builtins()->builtin(
- Builtins::kPlainReturn_LiveEdit);
- debug->thread_local_.after_break_target_ = plain_return->entry();
- } else if (debug->thread_local_.frame_drop_mode_ ==
+ Code* plain_return = isolate_->builtins()->builtin(
+ Builtins::kPlainReturn_LiveEdit);
+ thread_local_.after_break_target_ = plain_return->entry();
+ } else if (thread_local_.frame_drop_mode_ ==
FRAME_DROPPED_IN_DEBUG_SLOT_CALL) {
// Debug break slot stub does not return normally, instead it manually
// cleans the stack and jumps. We should patch the jump address.
- Code* plain_return = Isolate::Current()->builtins()->builtin(
+ Code* plain_return = isolate_->builtins()->builtin(
Builtins::kFrameDropper_LiveEdit);
- debug->thread_local_.after_break_target_ = plain_return->entry();
- } else if (debug->thread_local_.frame_drop_mode_ ==
+ thread_local_.after_break_target_ = plain_return->entry();
+ } else if (thread_local_.frame_drop_mode_ ==
FRAME_DROPPED_IN_DIRECT_CALL) {
// Nothing to do, after_break_target is not used here.
} else {
@@ -1029,6 +1024,11 @@
return heap->undefined_value();
}
+
+
+RUNTIME_FUNCTION(Object*, Debug_Break) {
+ return isolate->debug()->Break(args);
+}
// Check the break point objects for whether one or more are actually
=======================================
--- /branches/bleeding_edge/src/debug.h Fri Mar 18 13:35:07 2011
+++ /branches/bleeding_edge/src/debug.h Wed Mar 30 07:17:39 2011
@@ -228,7 +228,7 @@
void PreemptionWhileInDebugger();
void Iterate(ObjectVisitor* v);
- static Object* Break(RUNTIME_CALLING_CONVENTION);
+ Object* Break(Arguments args);
void SetBreakPoint(Handle<SharedFunctionInfo> shared,
Handle<Object> break_point_object,
int* source_position);
@@ -548,6 +548,9 @@
};
+DECLARE_RUNTIME_FUNCTION(Object*, Debug_Break);
+
+
// Message delivered to the message handler callback. This is either a
debugger
// event or the response to a command.
class MessageImpl: public v8::Debug::Message {
=======================================
--- /branches/bleeding_edge/src/ic.cc Mon Mar 28 09:36:08 2011
+++ /branches/bleeding_edge/src/ic.cc Wed Mar 30 07:17:39 2011
@@ -1815,8 +1815,7 @@
// Used from ic-<arch>.cc.
-MUST_USE_RESULT MaybeObject* CallIC_Miss(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, CallIC_Miss) {
NoHandleAllocation na;
ASSERT(args.length() == 2);
CallIC ic(isolate);
@@ -1846,8 +1845,7 @@
// Used from ic-<arch>.cc.
-MUST_USE_RESULT MaybeObject* KeyedCallIC_Miss(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, KeyedCallIC_Miss) {
NoHandleAllocation na;
ASSERT(args.length() == 2);
KeyedCallIC ic(isolate);
@@ -1868,8 +1866,7 @@
// Used from ic-<arch>.cc.
-MUST_USE_RESULT MaybeObject* LoadIC_Miss(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, LoadIC_Miss) {
NoHandleAllocation na;
ASSERT(args.length() == 2);
LoadIC ic(isolate);
@@ -1879,8 +1876,7 @@
// Used from ic-<arch>.cc
-MUST_USE_RESULT MaybeObject* KeyedLoadIC_Miss(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_Miss) {
NoHandleAllocation na;
ASSERT(args.length() == 2);
KeyedLoadIC ic(isolate);
@@ -1890,8 +1886,7 @@
// Used from ic-<arch>.cc.
-MUST_USE_RESULT MaybeObject* StoreIC_Miss(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, StoreIC_Miss) {
NoHandleAllocation na;
ASSERT(args.length() == 3);
StoreIC ic(isolate);
@@ -1905,8 +1900,7 @@
}
-MUST_USE_RESULT MaybeObject*
StoreIC_ArrayLength(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, StoreIC_ArrayLength) {
NoHandleAllocation nha;
ASSERT(args.length() == 2);
@@ -1927,9 +1921,7 @@
// Extend storage is called in a store inline cache when
// it is necessary to extend the properties array of a
// JSObject.
-MUST_USE_RESULT MaybeObject* SharedStoreIC_ExtendStorage(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, SharedStoreIC_ExtendStorage) {
NoHandleAllocation na;
ASSERT(args.length() == 3);
@@ -1963,8 +1955,7 @@
// Used from ic-<arch>.cc.
-MUST_USE_RESULT MaybeObject* KeyedStoreIC_Miss(RUNTIME_CALLING_CONVENTION)
{
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_Miss) {
NoHandleAllocation na;
ASSERT(args.length() == 3);
KeyedStoreIC ic(isolate);
@@ -2037,8 +2028,7 @@
Handle<Code> GetBinaryOpStub(int key, BinaryOpIC::TypeInfo type_info);
-MUST_USE_RESULT MaybeObject* BinaryOp_Patch(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, BinaryOp_Patch) {
ASSERT(args.length() == 5);
HandleScope scope(isolate);
@@ -2209,8 +2199,7 @@
TRBinaryOpIC::TypeInfo
result_type);
-MaybeObject* TypeRecordingBinaryOp_Patch(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, TypeRecordingBinaryOp_Patch) {
ASSERT(args.length() == 5);
HandleScope scope(isolate);
@@ -2365,8 +2354,7 @@
// Used from ic_<arch>.cc.
-Code* CompareIC_Miss(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(Code*, CompareIC_Miss) {
NoHandleAllocation na;
ASSERT(args.length() == 3);
CompareIC ic(isolate,
static_cast<Token::Value>(Smi::cast(args[2])->value()));
=======================================
--- /branches/bleeding_edge/src/runtime.cc Sun Mar 27 09:14:20 2011
+++ /branches/bleeding_edge/src/runtime.cc Wed Mar 30 07:17:39 2011
@@ -224,17 +224,13 @@
}
-static MaybeObject* Runtime_CloneLiteralBoilerplate(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CloneLiteralBoilerplate) {
CONVERT_CHECKED(JSObject, boilerplate, args[0]);
return DeepCopyBoilerplate(isolate, boilerplate);
}
-static MaybeObject* Runtime_CloneShallowLiteralBoilerplate(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CloneShallowLiteralBoilerplate) {
CONVERT_CHECKED(JSObject, boilerplate, args[0]);
return isolate->heap()->CopyJSObject(boilerplate);
}
@@ -475,9 +471,7 @@
}
-static MaybeObject* Runtime_CreateArrayLiteralBoilerplate(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateArrayLiteralBoilerplate) {
// Takes a FixedArray of elements containing the literal elements of
// the array literal and produces JSArray with those elements.
// Additionally takes the literals array of the surrounding function
@@ -499,8 +493,7 @@
}
-static MaybeObject*
Runtime_CreateObjectLiteral(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateObjectLiteral) {
HandleScope scope(isolate);
ASSERT(args.length() == 4);
CONVERT_ARG_CHECKED(FixedArray, literals, 0);
@@ -526,9 +519,7 @@
}
-static MaybeObject* Runtime_CreateObjectLiteralShallow(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateObjectLiteralShallow) {
HandleScope scope(isolate);
ASSERT(args.length() == 4);
CONVERT_ARG_CHECKED(FixedArray, literals, 0);
@@ -554,8 +545,7 @@
}
-static MaybeObject* Runtime_CreateArrayLiteral(RUNTIME_CALLING_CONVENTION)
{
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateArrayLiteral) {
HandleScope scope(isolate);
ASSERT(args.length() == 3);
CONVERT_ARG_CHECKED(FixedArray, literals, 0);
@@ -574,9 +564,7 @@
}
-static MaybeObject* Runtime_CreateArrayLiteralShallow(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateArrayLiteralShallow) {
HandleScope scope(isolate);
ASSERT(args.length() == 3);
CONVERT_ARG_CHECKED(FixedArray, literals, 0);
@@ -599,9 +587,7 @@
}
-static MaybeObject* Runtime_CreateCatchExtensionObject(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateCatchExtensionObject) {
ASSERT(args.length() == 2);
CONVERT_CHECKED(String, key, args[0]);
Object* value = args[1];
@@ -625,8 +611,7 @@
}
-static MaybeObject* Runtime_ClassOf(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_ClassOf) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
Object* obj = args[0];
@@ -635,8 +620,7 @@
}
-static MaybeObject* Runtime_IsInPrototypeChain(RUNTIME_CALLING_CONVENTION)
{
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_IsInPrototypeChain) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
// See ECMA-262, section 15.3.5.3, page 88 (steps 5 - 8).
@@ -652,8 +636,7 @@
// Inserts an object as the hidden prototype of another object.
-static MaybeObject* Runtime_SetHiddenPrototype(RUNTIME_CALLING_CONVENTION)
{
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_SetHiddenPrototype) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
CONVERT_CHECKED(JSObject, jsobject, args[0]);
@@ -695,8 +678,7 @@
}
-static MaybeObject* Runtime_IsConstructCall(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_IsConstructCall) {
NoHandleAllocation ha;
ASSERT(args.length() == 0);
JavaScriptFrameIterator it;
@@ -824,8 +806,7 @@
// [false, value, Writeable, Enumerable, Configurable]
// if args[1] is an accessor on args[0]
// [true, GetFunction, SetFunction, Enumerable, Configurable]
-static MaybeObject* Runtime_GetOwnProperty(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOwnProperty) {
ASSERT(args.length() == 2);
Heap* heap = isolate->heap();
HandleScope scope(isolate);
@@ -962,16 +943,14 @@
}
-static MaybeObject* Runtime_PreventExtensions(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_PreventExtensions) {
ASSERT(args.length() == 1);
CONVERT_CHECKED(JSObject, obj, args[0]);
return obj->PreventExtensions();
}
-static MaybeObject* Runtime_IsExtensible(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_IsExtensible) {
ASSERT(args.length() == 1);
CONVERT_CHECKED(JSObject, obj, args[0]);
if (obj->IsJSGlobalProxy()) {
@@ -985,8 +964,7 @@
}
-static MaybeObject* Runtime_RegExpCompile(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpCompile) {
HandleScope scope(isolate);
ASSERT(args.length() == 3);
CONVERT_ARG_CHECKED(JSRegExp, re, 0);
@@ -998,8 +976,7 @@
}
-static MaybeObject* Runtime_CreateApiFunction(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateApiFunction) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
CONVERT_ARG_CHECKED(FunctionTemplateInfo, data, 0);
@@ -1007,8 +984,7 @@
}
-static MaybeObject* Runtime_IsTemplate(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_IsTemplate) {
ASSERT(args.length() == 1);
Object* arg = args[0];
bool result = arg->IsObjectTemplateInfo() ||
arg->IsFunctionTemplateInfo();
@@ -1016,8 +992,7 @@
}
-static MaybeObject* Runtime_GetTemplateField(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetTemplateField) {
ASSERT(args.length() == 2);
CONVERT_CHECKED(HeapObject, templ, args[0]);
CONVERT_CHECKED(Smi, field, args[1]);
@@ -1036,8 +1011,7 @@
}
-static MaybeObject*
Runtime_DisableAccessChecks(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_DisableAccessChecks) {
ASSERT(args.length() == 1);
CONVERT_CHECKED(HeapObject, object, args[0]);
Map* old_map = object->map();
@@ -1057,8 +1031,7 @@
}
-static MaybeObject* Runtime_EnableAccessChecks(RUNTIME_CALLING_CONVENTION)
{
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_EnableAccessChecks) {
ASSERT(args.length() == 1);
CONVERT_CHECKED(HeapObject, object, args[0]);
Map* old_map = object->map();
@@ -1089,8 +1062,7 @@
}
-static MaybeObject* Runtime_DeclareGlobals(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareGlobals) {
ASSERT(args.length() == 4);
HandleScope scope(isolate);
Handle<GlobalObject> global = Handle<GlobalObject>(
@@ -1233,8 +1205,7 @@
}
-static MaybeObject* Runtime_DeclareContextSlot(RUNTIME_CALLING_CONVENTION)
{
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareContextSlot) {
HandleScope scope(isolate);
ASSERT(args.length() == 4);
@@ -1340,8 +1311,7 @@
}
-static MaybeObject*
Runtime_InitializeVarGlobal(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeVarGlobal) {
NoHandleAllocation nha;
// args[0] == name
// args[1] == strict_mode
@@ -1436,8 +1406,7 @@
}
-static MaybeObject*
Runtime_InitializeConstGlobal(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeConstGlobal) {
// All constants are declared with an initial value. The name
// of the constant is the first argument and the initial value
// is the second.
@@ -1527,9 +1496,7 @@
}
-static MaybeObject* Runtime_InitializeConstContextSlot(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeConstContextSlot) {
HandleScope scope(isolate);
ASSERT(args.length() == 3);
@@ -1636,9 +1603,8 @@
}
-static MaybeObject* Runtime_OptimizeObjectForAddingMultipleProperties(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*,
+ Runtime_OptimizeObjectForAddingMultipleProperties) {
HandleScope scope(isolate);
ASSERT(args.length() == 2);
CONVERT_ARG_CHECKED(JSObject, object, 0);
@@ -1650,8 +1616,7 @@
}
-static MaybeObject* Runtime_RegExpExec(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpExec) {
HandleScope scope(isolate);
ASSERT(args.length() == 4);
CONVERT_ARG_CHECKED(JSRegExp, regexp, 0);
@@ -1673,8 +1638,7 @@
}
-static MaybeObject*
Runtime_RegExpConstructResult(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpConstructResult) {
ASSERT(args.length() == 3);
CONVERT_SMI_CHECKED(elements_count, args[0]);
if (elements_count > JSArray::kMaxFastElementsLength) {
@@ -1707,8 +1671,7 @@
}
-static MaybeObject*
Runtime_RegExpInitializeObject(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpInitializeObject) {
AssertNoAllocation no_alloc;
ASSERT(args.length() == 5);
CONVERT_CHECKED(JSRegExp, regexp, args[0]);
@@ -1774,9 +1737,7 @@
}
-static MaybeObject* Runtime_FinishArrayPrototypeSetup(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FinishArrayPrototypeSetup) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
CONVERT_ARG_CHECKED(JSArray, prototype, 0);
@@ -1805,8 +1766,7 @@
}
-static MaybeObject*
Runtime_SpecialArrayFunctions(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_SpecialArrayFunctions) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
CONVERT_ARG_CHECKED(JSObject, holder, 0);
@@ -1823,8 +1783,7 @@
}
-static MaybeObject* Runtime_GetGlobalReceiver(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetGlobalReceiver) {
// Returns a real global receiver, not one of builtins object.
Context* global_context =
isolate->context()->global()->global_context();
@@ -1832,9 +1791,7 @@
}
-static MaybeObject* Runtime_MaterializeRegExpLiteral(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_MaterializeRegExpLiteral) {
HandleScope scope(isolate);
ASSERT(args.length() == 4);
CONVERT_ARG_CHECKED(FixedArray, literals, 0);
@@ -1864,8 +1821,7 @@
}
-static MaybeObject* Runtime_FunctionGetName(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetName) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
@@ -1874,8 +1830,7 @@
}
-static MaybeObject* Runtime_FunctionSetName(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetName) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -1886,9 +1841,7 @@
}
-static MaybeObject* Runtime_FunctionRemovePrototype(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionRemovePrototype) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
@@ -1900,8 +1853,7 @@
}
-static MaybeObject* Runtime_FunctionGetScript(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetScript) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
@@ -1913,8 +1865,7 @@
}
-static MaybeObject*
Runtime_FunctionGetSourceCode(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetSourceCode) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
@@ -1923,9 +1874,7 @@
}
-static MaybeObject* Runtime_FunctionGetScriptSourcePosition(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetScriptSourcePosition) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
@@ -1935,9 +1884,7 @@
}
-static MaybeObject* Runtime_FunctionGetPositionForOffset(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetPositionForOffset) {
ASSERT(args.length() == 2);
CONVERT_CHECKED(Code, code, args[0]);
@@ -1950,9 +1897,7 @@
}
-static MaybeObject* Runtime_FunctionSetInstanceClassName(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetInstanceClassName) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -1963,8 +1908,7 @@
}
-static MaybeObject* Runtime_FunctionSetLength(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetLength) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -1975,8 +1919,7 @@
}
-static MaybeObject*
Runtime_FunctionSetPrototype(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetPrototype) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -1991,8 +1934,7 @@
}
-static MaybeObject*
Runtime_FunctionIsAPIFunction(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsAPIFunction) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
@@ -2002,8 +1944,7 @@
}
-static MaybeObject* Runtime_FunctionIsBuiltin(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsBuiltin) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
@@ -2013,8 +1954,7 @@
}
-static MaybeObject* Runtime_SetCode(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_SetCode) {
HandleScope scope(isolate);
ASSERT(args.length() == 2);
@@ -2077,9 +2017,7 @@
}
-static MaybeObject* Runtime_SetExpectedNumberOfProperties(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_SetExpectedNumberOfProperties) {
HandleScope scope(isolate);
ASSERT(args.length() == 2);
CONVERT_ARG_CHECKED(JSFunction, function, 0);
@@ -2102,8 +2040,7 @@
}
-static MaybeObject* Runtime_StringCharCodeAt(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringCharCodeAt) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -2139,8 +2076,7 @@
}
-static MaybeObject* Runtime_CharFromCode(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_CharFromCode) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
return CharFromCode(isolate, args[0]);
@@ -2874,9 +2810,7 @@
}
-static MaybeObject* Runtime_StringReplaceRegExpWithString(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringReplaceRegExpWithString) {
ASSERT(args.length() == 4);
CONVERT_CHECKED(String, subject, args[0]);
@@ -2978,8 +2912,7 @@
}
-static MaybeObject* Runtime_StringIndexOf(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringIndexOf) {
HandleScope scope(isolate); // create a new handle scope
ASSERT(args.length() == 3);
@@ -3031,8 +2964,7 @@
return -1;
}
-static MaybeObject* Runtime_StringLastIndexOf(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringLastIndexOf) {
HandleScope scope(isolate); // create a new handle scope
ASSERT(args.length() == 3);
@@ -3089,8 +3021,7 @@
}
-static MaybeObject*
Runtime_StringLocaleCompare(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringLocaleCompare) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -3138,8 +3069,7 @@
}
-static MaybeObject* Runtime_SubString(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_SubString) {
NoHandleAllocation ha;
ASSERT(args.length() == 3);
@@ -3166,8 +3096,7 @@
}
-static MaybeObject* Runtime_StringMatch(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringMatch) {
ASSERT_EQ(3, args.length());
CONVERT_ARG_CHECKED(String, subject, 0);
@@ -3533,8 +3462,7 @@
}
-static MaybeObject* Runtime_RegExpExecMultiple(RUNTIME_CALLING_CONVENTION)
{
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpExecMultiple) {
ASSERT(args.length() == 4);
HandleScope handles(isolate);
@@ -3589,8 +3517,7 @@
}
-static MaybeObject*
Runtime_NumberToRadixString(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToRadixString) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -3629,8 +3556,7 @@
}
-static MaybeObject* Runtime_NumberToFixed(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToFixed) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -3655,8 +3581,7 @@
}
-static MaybeObject*
Runtime_NumberToExponential(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToExponential) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -3681,8 +3606,7 @@
}
-static MaybeObject* Runtime_NumberToPrecision(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToPrecision) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -3792,8 +3716,7 @@
}
-static MaybeObject* Runtime_GetProperty(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetProperty) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -3805,8 +3728,7 @@
// KeyedStringGetProperty is called from KeyedLoadIC::GenerateGeneric.
-static MaybeObject* Runtime_KeyedGetProperty(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_KeyedGetProperty) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -3880,9 +3802,7 @@
// Steps 9c & 12 - replace an existing data property with an accessor
property.
// Step 12 - update an existing accessor property with an accessor or
generic
// descriptor.
-static MaybeObject* Runtime_DefineOrRedefineAccessorProperty(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_DefineOrRedefineAccessorProperty) {
ASSERT(args.length() == 5);
HandleScope scope(isolate);
CONVERT_ARG_CHECKED(JSObject, obj, 0);
@@ -3919,9 +3839,7 @@
// Steps 9b & 12 - replace an existing accessor property with a data
property.
// Step 12 - update an existing data property with a data or generic
// descriptor.
-static MaybeObject* Runtime_DefineOrRedefineDataProperty(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_DefineOrRedefineDataProperty) {
ASSERT(args.length() == 4);
HandleScope scope(isolate);
CONVERT_ARG_CHECKED(JSObject, js_object, 0);
@@ -4157,8 +4075,7 @@
}
-static MaybeObject* Runtime_SetProperty(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_SetProperty) {
NoHandleAllocation ha;
RUNTIME_ASSERT(args.length() == 4 || args.length() == 5);
@@ -4191,9 +4108,7 @@
// Set a local property, even if it is READ_ONLY. If the property does not
// exist, it will be added with attributes NONE.
-static MaybeObject* Runtime_IgnoreAttributesAndSetProperty(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_IgnoreAttributesAndSetProperty) {
NoHandleAllocation ha;
RUNTIME_ASSERT(args.length() == 3 || args.length() == 4);
CONVERT_CHECKED(JSObject, object, args[0]);
@@ -4214,8 +4129,7 @@
}
-static MaybeObject* Runtime_DeleteProperty(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_DeleteProperty) {
NoHandleAllocation ha;
ASSERT(args.length() == 3);
@@ -4246,8 +4160,7 @@
}
-static MaybeObject* Runtime_HasLocalProperty(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_HasLocalProperty) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
CONVERT_CHECKED(String, key, args[1]);
@@ -4277,8 +4190,7 @@
}
-static MaybeObject* Runtime_HasProperty(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_HasProperty) {
NoHandleAllocation na;
ASSERT(args.length() == 2);
@@ -4292,8 +4204,7 @@
}
-static MaybeObject* Runtime_HasElement(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_HasElement) {
NoHandleAllocation na;
ASSERT(args.length() == 2);
@@ -4308,8 +4219,7 @@
}
-static MaybeObject*
Runtime_IsPropertyEnumerable(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_IsPropertyEnumerable) {
NoHandleAllocation ha;
ASSERT(args.length() == 2);
@@ -4326,8 +4236,7 @@
}
-static MaybeObject* Runtime_GetPropertyNames(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPropertyNames) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
CONVERT_ARG_CHECKED(JSObject, object, 0);
@@ -4340,8 +4249,7 @@
// all enumerable properties of the object and its prototypes
// have none, the map of the object. This is used to speed up
// the check for deletions during a for-in.
-static MaybeObject*
Runtime_GetPropertyNamesFast(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPropertyNamesFast) {
ASSERT(args.length() == 1);
CONVERT_CHECKED(JSObject, raw_object, args[0]);
@@ -4377,8 +4285,7 @@
// Return the names of the local named properties.
// args[0]: object
-static MaybeObject*
Runtime_GetLocalPropertyNames(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetLocalPropertyNames) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
if (!args[0]->IsJSObject()) {
@@ -4464,8 +4371,7 @@
// Return the names of the local indexed properties.
// args[0]: object
-static MaybeObject*
Runtime_GetLocalElementNames(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetLocalElementNames) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
if (!args[0]->IsJSObject()) {
@@ -4482,8 +4388,7 @@
// Return information on whether an object has a named or indexed
interceptor.
// args[0]: object
-static MaybeObject* Runtime_GetInterceptorInfo(RUNTIME_CALLING_CONVENTION)
{
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetInterceptorInfo) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
if (!args[0]->IsJSObject()) {
@@ -4501,9 +4406,7 @@
// Return property names from named interceptor.
// args[0]: object
-static MaybeObject* Runtime_GetNamedInterceptorPropertyNames(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetNamedInterceptorPropertyNames) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
CONVERT_ARG_CHECKED(JSObject, obj, 0);
@@ -4518,9 +4421,7 @@
// Return element names from indexed interceptor.
// args[0]: object
-static MaybeObject* Runtime_GetIndexedInterceptorElementNames(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetIndexedInterceptorElementNames) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
CONVERT_ARG_CHECKED(JSObject, obj, 0);
@@ -4533,8 +4434,7 @@
}
-static MaybeObject* Runtime_LocalKeys(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_LocalKeys) {
ASSERT_EQ(args.length(), 1);
CONVERT_CHECKED(JSObject, raw_object, args[0]);
HandleScope scope(isolate);
@@ -4579,8 +4479,7 @@
}
-static MaybeObject*
Runtime_GetArgumentsProperty(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetArgumentsProperty) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
@@ -4633,8 +4532,7 @@
}
-static MaybeObject* Runtime_ToFastProperties(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_ToFastProperties) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
@@ -4650,8 +4548,7 @@
}
-static MaybeObject* Runtime_ToSlowProperties(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_ToSlowProperties) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
@@ -4664,8 +4561,7 @@
}
-static MaybeObject* Runtime_ToBool(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_ToBool) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
@@ -4675,8 +4571,7 @@
// Returns the type string of a value; see ECMA-262, 11.4.3 (p 47).
// Possible optimizations: put the type string into the oddballs.
-static MaybeObject* Runtime_Typeof(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_Typeof) {
NoHandleAllocation ha;
Object* obj = args[0];
@@ -4735,8 +4630,7 @@
}
-static MaybeObject* Runtime_StringToNumber(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringToNumber) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
CONVERT_CHECKED(String, subject, args[0]);
@@ -4790,9 +4684,7 @@
}
-static MaybeObject* Runtime_StringFromCharCodeArray(
- RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringFromCharCodeArray) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
@@ -4872,8 +4764,7 @@
}
-static MaybeObject* Runtime_URIEscape(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_URIEscape) {
const char hex_chars[] = "0123456789ABCDEF";
NoHandleAllocation ha;
ASSERT(args.length() == 1);
@@ -4992,8 +4883,7 @@
}
-static MaybeObject* Runtime_URIUnescape(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_URIUnescape) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
CONVERT_CHECKED(String, source, args[0]);
@@ -5237,8 +5127,7 @@
}
-static MaybeObject* Runtime_QuoteJSONString(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_QuoteJSONString) {
NoHandleAllocation ha;
CONVERT_CHECKED(String, str, args[0]);
if (!str->IsFlat()) {
@@ -5260,8 +5149,7 @@
}
-static MaybeObject*
Runtime_QuoteJSONStringComma(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_QuoteJSONStringComma) {
NoHandleAllocation ha;
CONVERT_CHECKED(String, str, args[0]);
if (!str->IsFlat()) {
@@ -5282,8 +5170,7 @@
}
}
-static MaybeObject* Runtime_StringParseInt(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringParseInt) {
NoHandleAllocation ha;
CONVERT_CHECKED(String, s, args[0]);
@@ -5297,8 +5184,7 @@
}
-static MaybeObject* Runtime_StringParseFloat(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringParseFloat) {
NoHandleAllocation ha;
CONVERT_CHECKED(String, str, args[0]);
@@ -5589,15 +5475,13 @@
}
-static MaybeObject* Runtime_StringToLowerCase(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringToLowerCase) {
return ConvertCase<ToLowerTraits>(
args, isolate, isolate->runtime_state()->to_lower_mapping());
}
-static MaybeObject* Runtime_StringToUpperCase(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringToUpperCase) {
return ConvertCase<ToUpperTraits>(
args, isolate, isolate->runtime_state()->to_upper_mapping());
}
@@ -5608,8 +5492,7 @@
}
-static MaybeObject* Runtime_StringTrim(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringTrim) {
NoHandleAllocation ha;
ASSERT(args.length() == 3);
@@ -5659,8 +5542,7 @@
}
-static MaybeObject* Runtime_StringSplit(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringSplit) {
ASSERT(args.length() == 3);
HandleScope handle_scope(isolate);
CONVERT_ARG_CHECKED(String, subject, 0);
@@ -5791,8 +5673,7 @@
// Converts a String to JSArray.
// For example, "foo" => ["f", "o", "o"].
-static MaybeObject* Runtime_StringToArray(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, Runtime_StringToArray) {
HandleScope scope(isolate);
ASSERT(args.length() == 2);
CONVERT_ARG_CHECKED(String, s, 0);
@@ -5840,8 +5721,7 @@
***The diff for this file has been truncated for email.***
=======================================
--- /branches/bleeding_edge/src/stub-cache.cc Wed Mar 30 01:18:56 2011
+++ /branches/bleeding_edge/src/stub-cache.cc Wed Mar 30 07:17:39 2011
@@ -1278,8 +1278,7 @@
// StubCompiler implementation.
-MaybeObject* LoadCallbackProperty(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, LoadCallbackProperty) {
ASSERT(args[0]->IsJSObject());
ASSERT(args[1]->IsJSObject());
AccessorInfo* callback = AccessorInfo::cast(args[3]);
@@ -1301,8 +1300,7 @@
}
-MaybeObject* StoreCallbackProperty(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, StoreCallbackProperty) {
JSObject* recv = JSObject::cast(args[0]);
AccessorInfo* callback = AccessorInfo::cast(args[1]);
Address setter_address = v8::ToCData<Address>(callback->setter());
@@ -1335,8 +1333,7 @@
* Returns |Heap::no_interceptor_result_sentinel()| if interceptor doesn't
* provide any value for the given name.
*/
-MaybeObject* LoadPropertyWithInterceptorOnly(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorOnly) {
Handle<String> name_handle = args.at<String>(0);
Handle<InterceptorInfo> interceptor_info = args.at<InterceptorInfo>(1);
ASSERT(kAccessorInfoOffsetInInterceptorArgs == 2);
@@ -1435,8 +1432,7 @@
* Loads a property with an interceptor performing post interceptor
* lookup if interceptor failed.
*/
-MaybeObject*
LoadPropertyWithInterceptorForLoad(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorForLoad) {
PropertyAttributes attr = NONE;
Object* result;
{ MaybeObject* maybe_result = LoadWithInterceptor(&args, &attr);
@@ -1449,8 +1445,7 @@
}
-MaybeObject*
LoadPropertyWithInterceptorForCall(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorForCall) {
PropertyAttributes attr;
MaybeObject* result = LoadWithInterceptor(&args, &attr);
RETURN_IF_SCHEDULED_EXCEPTION(isolate);
@@ -1461,8 +1456,7 @@
}
-MaybeObject* StoreInterceptorProperty(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty) {
ASSERT(args.length() == 4);
JSObject* recv = JSObject::cast(args[0]);
String* name = String::cast(args[1]);
@@ -1478,8 +1472,7 @@
}
-MaybeObject* KeyedLoadPropertyWithInterceptor(RUNTIME_CALLING_CONVENTION) {
- RUNTIME_GET_ISOLATE;
+RUNTIME_FUNCTION(MaybeObject*, KeyedLoadPropertyWithInterceptor) {
JSObject* receiver = JSObject::cast(args[0]);
ASSERT(Smi::cast(args[1])->value() >= 0);
uint32_t index = Smi::cast(args[1])->value();
=======================================
--- /branches/bleeding_edge/src/stub-cache.h Wed Mar 30 01:24:46 2011
+++ /branches/bleeding_edge/src/stub-cache.h Wed Mar 30 07:17:39 2011
@@ -392,17 +392,17 @@
// Support functions for IC stubs for callbacks.
-MaybeObject* LoadCallbackProperty(RUNTIME_CALLING_CONVENTION);
-MaybeObject* StoreCallbackProperty(RUNTIME_CALLING_CONVENTION);
+DECLARE_RUNTIME_FUNCTION(MaybeObject*, LoadCallbackProperty);
+DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreCallbackProperty);
// Support functions for IC stubs for interceptors.
-MaybeObject* LoadPropertyWithInterceptorOnly(RUNTIME_CALLING_CONVENTION);
-MaybeObject*
LoadPropertyWithInterceptorForLoad(RUNTIME_CALLING_CONVENTION);
-MaybeObject*
LoadPropertyWithInterceptorForCall(RUNTIME_CALLING_CONVENTION);
-MaybeObject* StoreInterceptorProperty(RUNTIME_CALLING_CONVENTION);
-MaybeObject* CallInterceptorProperty(RUNTIME_CALLING_CONVENTION);
-MaybeObject* KeyedLoadPropertyWithInterceptor(RUNTIME_CALLING_CONVENTION);
+DECLARE_RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorOnly);
+DECLARE_RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorForLoad);
+DECLARE_RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorForCall);
+DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty);
+DECLARE_RUNTIME_FUNCTION(MaybeObject*, CallInterceptorProperty);
+DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadPropertyWithInterceptor);
// The stub compiler compiles stubs for the stub cache.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev