Revision: 16545
Author: [email protected]
Date: Thu Sep 5 08:48:34 2013 UTC
Log: add isolate parameter for Execution::Call
[email protected]
BUG=
Review URL: https://codereview.chromium.org/23661004
http://code.google.com/p/v8/source/detail?r=16545
Modified:
/branches/bleeding_edge/src/api.cc
/branches/bleeding_edge/src/bootstrapper.cc
/branches/bleeding_edge/src/builtins.cc
/branches/bleeding_edge/src/debug.cc
/branches/bleeding_edge/src/execution.cc
/branches/bleeding_edge/src/execution.h
/branches/bleeding_edge/src/handles.cc
/branches/bleeding_edge/src/ic.cc
/branches/bleeding_edge/src/json-stringifier.h
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/src/runtime.cc
/branches/bleeding_edge/test/cctest/cctest.h
/branches/bleeding_edge/test/cctest/test-compiler.cc
/branches/bleeding_edge/test/cctest/test-parsing.cc
/branches/bleeding_edge/test/cctest/test-random.cc
=======================================
--- /branches/bleeding_edge/src/api.cc Wed Sep 4 13:37:39 2013 UTC
+++ /branches/bleeding_edge/src/api.cc Thu Sep 5 08:48:34 2013 UTC
@@ -1877,8 +1877,8 @@
EXCEPTION_PREAMBLE(isolate);
i::Handle<i::Object> receiver(
isolate->context()->global_proxy(), isolate);
- i::Handle<i::Object> result =
- i::Execution::Call(fun, receiver, 0, NULL, &has_pending_exception);
+ i::Handle<i::Object> result = i::Execution::Call(
+ isolate, fun, receiver, 0, NULL, &has_pending_exception);
EXCEPTION_BAILOUT_CHECK_DO_CALLBACK(isolate, Local<Value>());
raw_result = *result;
}
@@ -2177,8 +2177,8 @@
isolate->js_builtins_object()->GetPropertyNoExceptionThrown(*fmt_str);
i::Handle<i::JSFunction> fun =
i::Handle<i::JSFunction>(i::JSFunction::cast(object_fun));
- i::Handle<i::Object> value =
- i::Execution::Call(fun, recv, argc, argv, has_pending_exception);
+ i::Handle<i::Object> value = i::Execution::Call(
+ isolate, fun, recv, argc, argv, has_pending_exception);
return value;
}
@@ -4143,8 +4143,8 @@
recv_obj = obj;
}
EXCEPTION_PREAMBLE(isolate);
- i::Handle<i::Object> returned =
- i::Execution::Call(fun, recv_obj, argc, args,
&has_pending_exception);
+ i::Handle<i::Object> returned = i::Execution::Call(
+ isolate, fun, recv_obj, argc, args, &has_pending_exception);
EXCEPTION_BAILOUT_CHECK_DO_CALLBACK(isolate, Local<Value>());
return Utils::ToLocal(scope.CloseAndEscape(returned));
}
@@ -4179,8 +4179,8 @@
if (!delegate->IsUndefined()) {
i::Handle<i::JSFunction> fun =
i::Handle<i::JSFunction>::cast(delegate);
EXCEPTION_PREAMBLE(isolate);
- i::Handle<i::Object> returned =
- i::Execution::Call(fun, obj, argc, args, &has_pending_exception);
+ i::Handle<i::Object> returned = i::Execution::Call(
+ isolate, fun, obj, argc, args, &has_pending_exception);
EXCEPTION_BAILOUT_CHECK_DO_CALLBACK(isolate, Local<v8::Object>());
ASSERT(!delegate->IsUndefined());
return Utils::ToLocal(scope.CloseAndEscape(returned));
@@ -4231,8 +4231,8 @@
STATIC_ASSERT(sizeof(v8::Handle<v8::Value>) == sizeof(i::Object**));
i::Handle<i::Object>* args =
reinterpret_cast<i::Handle<i::Object>*>(argv);
EXCEPTION_PREAMBLE(isolate);
- i::Handle<i::Object> returned =
- i::Execution::Call(fun, recv_obj, argc, args,
&has_pending_exception);
+ i::Handle<i::Object> returned = i::Execution::Call(
+ isolate, fun, recv_obj, argc, args, &has_pending_exception);
EXCEPTION_BAILOUT_CHECK_DO_CALLBACK(isolate, Local<Object>());
raw_result = *returned;
}
=======================================
--- /branches/bleeding_edge/src/bootstrapper.cc Tue Sep 3 11:54:08 2013 UTC
+++ /branches/bleeding_edge/src/bootstrapper.cc Thu Sep 5 08:48:34 2013 UTC
@@ -1552,7 +1552,7 @@
: top_context->global_object(),
isolate);
bool has_pending_exception;
- Execution::Call(fun, receiver, 0, NULL, &has_pending_exception);
+ Execution::Call(isolate, fun, receiver, 0, NULL, &has_pending_exception);
if (has_pending_exception) return false;
return true;
}
=======================================
--- /branches/bleeding_edge/src/builtins.cc Wed Sep 4 07:05:11 2013 UTC
+++ /branches/bleeding_edge/src/builtins.cc Thu Sep 5 08:48:34 2013 UTC
@@ -448,7 +448,8 @@
argv[i] = args.at<Object>(i + 1);
}
bool pending_exception;
- Handle<Object> result = Execution::Call(function,
+ Handle<Object> result = Execution::Call(isolate,
+ function,
args.receiver(),
argc,
argv.start(),
=======================================
--- /branches/bleeding_edge/src/debug.cc Wed Sep 4 10:41:51 2013 UTC
+++ /branches/bleeding_edge/src/debug.cc Thu Sep 5 08:48:34 2013 UTC
@@ -3404,6 +3404,7 @@
Handle<Object> argv[] = { exec_state, data };
Handle<Object> result = Execution::Call(
+ isolate_,
fun,
Handle<Object>(isolate_->debug()->debug_context_->global_proxy(),
isolate_),
=======================================
--- /branches/bleeding_edge/src/execution.cc Wed Sep 4 07:05:11 2013 UTC
+++ /branches/bleeding_edge/src/execution.cc Thu Sep 5 08:48:34 2013 UTC
@@ -148,7 +148,8 @@
}
-Handle<Object> Execution::Call(Handle<Object> callable,
+Handle<Object> Execution::Call(Isolate* isolate,
+ Handle<Object> callable,
Handle<Object> receiver,
int argc,
Handle<Object> argv[],
@@ -156,7 +157,6 @@
bool convert_receiver) {
*pending_exception = false;
- Isolate* isolate = Isolate::Current();
if (!callable->IsJSFunction()) {
callable = TryGetFunctionDelegate(isolate, callable,
pending_exception);
if (*pending_exception) return callable;
@@ -599,7 +599,8 @@
do { \
Handle<Object> argv[] = args; \
ASSERT(has_pending_exception != NULL); \
- return Call(isolate->name##_fun(), \
+ return Call(isolate, \
+ isolate->name##_fun(), \
isolate->js_builtins_object(), \
ARRAY_SIZE(argv), argv, \
has_pending_exception); \
@@ -712,7 +713,8 @@
if (elm->IsJSFunction()) return
Handle<JSFunction>(JSFunction::cast(elm));
// The function has not yet been instantiated in this context; do it.
Handle<Object> args[] = { data };
- Handle<Object> result = Call(isolate->instantiate_fun(),
+ Handle<Object> result = Call(isolate,
+ isolate->instantiate_fun(),
isolate->js_builtins_object(),
ARRAY_SIZE(args),
args,
@@ -744,7 +746,8 @@
return Handle<JSObject>(JSObject::cast(result));
} else {
Handle<Object> args[] = { data };
- Handle<Object> result = Call(isolate->instantiate_fun(),
+ Handle<Object> result = Call(isolate,
+ isolate->instantiate_fun(),
isolate->js_builtins_object(),
ARRAY_SIZE(args),
args,
@@ -760,7 +763,8 @@
Handle<Object> instance_template,
bool* exc) {
Handle<Object> args[] = { instance, instance_template };
- Execution::Call(isolate->configure_instance_fun(),
+ Execution::Call(isolate,
+ isolate->configure_instance_fun(),
isolate->js_builtins_object(),
ARRAY_SIZE(args),
args,
=======================================
--- /branches/bleeding_edge/src/execution.h Tue Sep 3 06:59:01 2013 UTC
+++ /branches/bleeding_edge/src/execution.h Thu Sep 5 08:48:34 2013 UTC
@@ -62,7 +62,8 @@
// and the function called is not in strict mode, receiver is converted
to
// an object.
//
- static Handle<Object> Call(Handle<Object> callable,
+ static Handle<Object> Call(Isolate* isolate,
+ Handle<Object> callable,
Handle<Object> receiver,
int argc,
Handle<Object> argv[],
=======================================
--- /branches/bleeding_edge/src/handles.cc Fri Aug 30 14:08:15 2013 UTC
+++ /branches/bleeding_edge/src/handles.cc Thu Sep 5 08:48:34 2013 UTC
@@ -615,8 +615,12 @@
if (p->IsJSProxy()) {
Handle<JSProxy> proxy(JSProxy::cast(*p), isolate);
Handle<Object> args[] = { proxy };
- Handle<Object> names = Execution::Call(
- isolate->proxy_enumerate(), object, ARRAY_SIZE(args), args,
threw);
+ Handle<Object> names = Execution::Call(isolate,
+ isolate->proxy_enumerate(),
+ object,
+ ARRAY_SIZE(args),
+ args,
+ threw);
if (*threw) return content;
content = AddKeysFromJSArray(content, Handle<JSArray>::cast(names));
break;
=======================================
--- /branches/bleeding_edge/src/ic.cc Thu Sep 5 08:34:17 2013 UTC
+++ /branches/bleeding_edge/src/ic.cc Thu Sep 5 08:48:34 2013 UTC
@@ -2792,7 +2792,8 @@
bool caught_exception;
Handle<Object> builtin_args[] = { right };
- Handle<Object> result = Execution::Call(builtin_function,
+ Handle<Object> result = Execution::Call(isolate,
+ builtin_function,
left,
ARRAY_SIZE(builtin_args),
builtin_args,
=======================================
--- /branches/bleeding_edge/src/json-stringifier.h Wed Sep 4 07:05:11 2013
UTC
+++ /branches/bleeding_edge/src/json-stringifier.h Thu Sep 5 08:48:34 2013
UTC
@@ -367,7 +367,7 @@
Handle<Object> argv[] = { key };
bool has_exception = false;
HandleScope scope(isolate_);
- object = Execution::Call(fun, object, 1, argv, &has_exception);
+ object = Execution::Call(isolate_, fun, object, 1, argv, &has_exception);
// Return empty handle to signal an exception.
if (has_exception) return Handle<Object>::null();
return scope.CloseAndEscape(object);
@@ -470,7 +470,7 @@
Handle<Object> argv[] = { key, object };
bool has_exception = false;
Handle<Object> result =
- Execution::Call(builtin, object, 2, argv, &has_exception);
+ Execution::Call(isolate_, builtin, object, 2, argv, &has_exception);
if (has_exception) return EXCEPTION;
if (result->IsUndefined()) return UNCHANGED;
if (deferred_key) {
=======================================
--- /branches/bleeding_edge/src/objects.cc Wed Sep 4 13:53:24 2013 UTC
+++ /branches/bleeding_edge/src/objects.cc Thu Sep 5 08:48:34 2013 UTC
@@ -485,8 +485,8 @@
#endif
bool has_pending_exception;
- Handle<Object> result =
- Execution::Call(fun, self, 0, NULL, &has_pending_exception, true);
+ Handle<Object> result = Execution::Call(
+ isolate, fun, self, 0, NULL, &has_pending_exception, true);
// Check for pending exception and return the result.
if (has_pending_exception) return Failure::Exception();
return *result;
@@ -2089,7 +2089,8 @@
}
Handle<Object> args[] = { type, object, name, old_value };
bool threw;
- Execution::Call(Handle<JSFunction>(isolate->observers_notify_change()),
+ Execution::Call(isolate,
+ Handle<JSFunction>(isolate->observers_notify_change()),
isolate->factory()->undefined_value(),
old_value->IsTheHole() ? 3 : 4, args,
&threw);
@@ -2101,6 +2102,7 @@
ASSERT(isolate->observer_delivery_pending());
bool threw = false;
Execution::Call(
+ isolate,
isolate->observers_deliver_changes(),
isolate->factory()->undefined_value(),
0,
@@ -2877,7 +2879,8 @@
#endif
bool has_pending_exception;
Handle<Object> argv[] = { value_handle };
- Execution::Call(fun, self, ARRAY_SIZE(argv), argv,
&has_pending_exception);
+ Execution::Call(
+ isolate, fun, self, ARRAY_SIZE(argv), argv, &has_pending_exception);
// Check for pending exception and return the result.
if (has_pending_exception) return Failure::Exception();
return *value_handle;
@@ -3492,9 +3495,9 @@
// Emulate [[GetProperty]] semantics for proxies.
bool has_pending_exception;
Handle<Object> argv[] = { result };
- Handle<Object> desc =
- Execution::Call(isolate->to_complete_property_descriptor(), result,
- ARRAY_SIZE(argv), argv, &has_pending_exception);
+ Handle<Object> desc = Execution::Call(
+ isolate, isolate->to_complete_property_descriptor(), result,
+ ARRAY_SIZE(argv), argv, &has_pending_exception);
if (has_pending_exception) return Failure::Exception();
// [[GetProperty]] requires to check that all properties are
configurable.
@@ -3617,9 +3620,9 @@
bool has_pending_exception;
Handle<Object> argv[] = { result };
- Handle<Object> desc =
- Execution::Call(isolate->to_complete_property_descriptor(), result,
- ARRAY_SIZE(argv), argv, &has_pending_exception);
+ Handle<Object> desc = Execution::Call(
+ isolate, isolate->to_complete_property_descriptor(), result,
+ ARRAY_SIZE(argv), argv, &has_pending_exception);
if (has_pending_exception) return NONE;
// Convert result to PropertyAttributes.
@@ -3717,7 +3720,7 @@
}
bool threw;
- return Execution::Call(trap, handler, argc, argv, &threw);
+ return Execution::Call(isolate, trap, handler, argc, argv, &threw);
}
@@ -11045,7 +11048,8 @@
{ object, index_object, deleted, add_count_object };
bool threw;
- Execution::Call(Handle<JSFunction>(isolate->observers_enqueue_splice()),
+ Execution::Call(isolate,
+ Handle<JSFunction>(isolate->observers_enqueue_splice()),
isolate->factory()->undefined_value(), ARRAY_SIZE(args),
args,
&threw);
ASSERT(!threw);
@@ -11058,7 +11062,8 @@
Handle<Object> args[] = { object };
bool threw;
-
Execution::Call(Handle<JSFunction>(isolate->observers_begin_perform_splice()),
+ Execution::Call(isolate,
+
Handle<JSFunction>(isolate->observers_begin_perform_splice()),
isolate->factory()->undefined_value(), ARRAY_SIZE(args),
args,
&threw);
ASSERT(!threw);
@@ -11071,7 +11076,8 @@
Handle<Object> args[] = { object };
bool threw;
-
Execution::Call(Handle<JSFunction>(isolate->observers_end_perform_splice()),
+ Execution::Call(isolate,
+
Handle<JSFunction>(isolate->observers_end_perform_splice()),
isolate->factory()->undefined_value(), ARRAY_SIZE(args),
args,
&threw);
ASSERT(!threw);
=======================================
--- /branches/bleeding_edge/src/runtime.cc Wed Sep 4 12:55:59 2013 UTC
+++ /branches/bleeding_edge/src/runtime.cc Thu Sep 5 08:48:34 2013 UTC
@@ -8667,8 +8667,8 @@
bool threw;
Handle<JSReceiver> hfun(fun);
Handle<Object> hreceiver(receiver, isolate);
- Handle<Object> result =
- Execution::Call(hfun, hreceiver, argc, argv, &threw, true);
+ Handle<Object> result = Execution::Call(
+ isolate, hfun, hreceiver, argc, argv, &threw, true);
if (threw) return Failure::Exception();
return *result;
@@ -8702,8 +8702,8 @@
}
bool threw;
- Handle<Object> result =
- Execution::Call(fun, receiver, argc, argv, &threw, true);
+ Handle<Object> result = Execution::Call(
+ isolate, fun, receiver, argc, argv, &threw, true);
if (threw) return Failure::Exception();
return *result;
@@ -12582,7 +12582,7 @@
shared, context, NOT_TENURED);
bool pending_exception;
Handle<Object> result = Execution::Call(
- eval_fun, receiver, 0, NULL, &pending_exception);
+ isolate, eval_fun, receiver, 0, NULL, &pending_exception);
if (pending_exception) return Failure::Exception();
@@ -13353,11 +13353,19 @@
bool pending_exception;
{
if (without_debugger) {
- result = Execution::Call(function, isolate->global_object(), 0, NULL,
+ result = Execution::Call(isolate,
+ function,
+ isolate->global_object(),
+ 0,
+ NULL,
&pending_exception);
} else {
EnterDebugger enter_debugger(isolate);
- result = Execution::Call(function, isolate->global_object(), 0, NULL,
+ result = Execution::Call(isolate,
+ function,
+ isolate->global_object(),
+ 0,
+ NULL,
&pending_exception);
}
}
@@ -14224,7 +14232,8 @@
// This handle is nor shared, nor used later, so it's safe.
Handle<Object> argv[] = { key_handle };
bool pending_exception;
- value = Execution::Call(factory,
+ value = Execution::Call(isolate,
+ factory,
receiver,
ARRAY_SIZE(argv),
argv,
=======================================
--- /branches/bleeding_edge/test/cctest/cctest.h Mon Sep 2 12:26:06 2013
UTC
+++ /branches/bleeding_edge/test/cctest/cctest.h Thu Sep 5 08:48:34 2013
UTC
@@ -90,6 +90,10 @@
}
static v8::Isolate* isolate() { return default_isolate_; }
+
+ static i::Isolate* i_isolate() {
+ return reinterpret_cast<i::Isolate*>(default_isolate_);
+ }
// Helper function to initialize the VM.
static void InitializeVM(CcTestExtensionFlags extensions =
NO_EXTENSIONS);
=======================================
--- /branches/bleeding_edge/test/cctest/test-compiler.cc Tue Jul 30
17:05:50 2013 UTC
+++ /branches/bleeding_edge/test/cctest/test-compiler.cc Thu Sep 5
08:48:34 2013 UTC
@@ -116,7 +116,7 @@
}
-static double Inc(int x) {
+static double Inc(Isolate* isolate, int x) {
const char* source = "result = %d + 1;";
EmbeddedVector<char, 512> buffer;
OS::SNPrintF(buffer, source, x);
@@ -125,8 +125,8 @@
if (fun.is_null()) return -1;
bool has_pending_exception;
- Handle<JSObject> global(Isolate::Current()->context()->global_object());
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Handle<JSObject> global(isolate->context()->global_object());
+ Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
return GetGlobalProperty("result")->ToObjectChecked()->Number();
}
@@ -135,19 +135,19 @@
TEST(Inc) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
- CHECK_EQ(4.0, Inc(3));
+ CHECK_EQ(4.0, Inc(CcTest::i_isolate(), 3));
}
-static double Add(int x, int y) {
+static double Add(Isolate* isolate, int x, int y) {
Handle<JSFunction> fun = Compile("result = x + y;");
if (fun.is_null()) return -1;
SetGlobalProperty("x", Smi::FromInt(x));
SetGlobalProperty("y", Smi::FromInt(y));
bool has_pending_exception;
- Handle<JSObject> global(Isolate::Current()->context()->global_object());
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Handle<JSObject> global(isolate->context()->global_object());
+ Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
return GetGlobalProperty("result")->ToObjectChecked()->Number();
}
@@ -156,18 +156,18 @@
TEST(Add) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
- CHECK_EQ(5.0, Add(2, 3));
+ CHECK_EQ(5.0, Add(CcTest::i_isolate(), 2, 3));
}
-static double Abs(int x) {
+static double Abs(Isolate* isolate, int x) {
Handle<JSFunction> fun = Compile("if (x < 0) result = -x; else result =
x;");
if (fun.is_null()) return -1;
SetGlobalProperty("x", Smi::FromInt(x));
bool has_pending_exception;
- Handle<JSObject> global(Isolate::Current()->context()->global_object());
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Handle<JSObject> global(isolate->context()->global_object());
+ Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
return GetGlobalProperty("result")->ToObjectChecked()->Number();
}
@@ -176,19 +176,19 @@
TEST(Abs) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
- CHECK_EQ(3.0, Abs(-3));
+ CHECK_EQ(3.0, Abs(CcTest::i_isolate(), -3));
}
-static double Sum(int n) {
+static double Sum(Isolate* isolate, int n) {
Handle<JSFunction> fun =
Compile("s = 0; while (n > 0) { s += n; n -= 1; }; result = s;");
if (fun.is_null()) return -1;
SetGlobalProperty("n", Smi::FromInt(n));
bool has_pending_exception;
- Handle<JSObject> global(Isolate::Current()->context()->global_object());
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Handle<JSObject> global(isolate->context()->global_object());
+ Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
return GetGlobalProperty("result")->ToObjectChecked()->Number();
}
@@ -197,7 +197,7 @@
TEST(Sum) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
- CHECK_EQ(5050.0, Sum(100));
+ CHECK_EQ(5050.0, Sum(CcTest::i_isolate(), 100));
}
@@ -208,8 +208,9 @@
Handle<JSFunction> fun = Compile(source);
if (fun.is_null()) return;
bool has_pending_exception;
- Handle<JSObject> global(Isolate::Current()->context()->global_object());
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Handle<JSObject> global(CcTest::i_isolate()->context()->global_object());
+ Execution::Call(
+ CcTest::i_isolate(), fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
}
@@ -241,8 +242,9 @@
Handle<JSFunction> fun = Compile(source);
CHECK(!fun.is_null());
bool has_pending_exception;
- Handle<JSObject> global(Isolate::Current()->context()->global_object());
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Handle<JSObject> global(CcTest::i_isolate()->context()->global_object());
+ Execution::Call(
+ CcTest::i_isolate(), fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
CHECK_EQ(511.0, GetGlobalProperty("r")->ToObjectChecked()->Number());
}
@@ -258,7 +260,7 @@
bool has_pending_exception;
Isolate* isolate = fun->GetIsolate();
Handle<JSObject> global(isolate->context()->global_object());
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
CHECK(has_pending_exception);
CHECK_EQ(42.0,
isolate->pending_exception()->ToObjectChecked()->Number());
}
@@ -282,8 +284,9 @@
// Run the generated code to populate the global object with 'foo'.
bool has_pending_exception;
- Handle<JSObject> global(Isolate::Current()->context()->global_object());
- Execution::Call(fun0, global, 0, NULL, &has_pending_exception);
+ Handle<JSObject> global(isolate->context()->global_object());
+ Execution::Call(
+ isolate, fun0, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
Object* foo_string = isolate->factory()->InternalizeOneByteString(
@@ -295,7 +298,8 @@
Handle<Object> argv[] = { isolate->factory()->InternalizeOneByteString(
STATIC_ASCII_VECTOR("hello")) };
- Execution::Call(Handle<JSFunction>::cast(fun1),
+ Execution::Call(isolate,
+ Handle<JSFunction>::cast(fun1),
global,
ARRAY_SIZE(argv),
argv,
=======================================
--- /branches/bleeding_edge/test/cctest/test-parsing.cc Wed Sep 4 07:05:11
2013 UTC
+++ /branches/bleeding_edge/test/cctest/test-parsing.cc Thu Sep 5 08:48:34
2013 UTC
@@ -1067,8 +1067,8 @@
i::GetProperty(builtins, "FormatMessage");
i::Handle<i::Object> arg_handles[] = { format, args_array };
bool has_exception = false;
- i::Handle<i::Object> result =
- i::Execution::Call(format_fun, builtins, 2, arg_handles,
&has_exception);
+ i::Handle<i::Object> result = i::Execution::Call(
+ isolate, format_fun, builtins, 2, arg_handles, &has_exception);
CHECK(!has_exception);
CHECK(result->IsString());
for (int i = 0; i < args.length(); i++) {
=======================================
--- /branches/bleeding_edge/test/cctest/test-random.cc Tue Sep 3 08:49:44
2013 UTC
+++ /branches/bleeding_edge/test/cctest/test-random.cc Thu Sep 5 08:48:34
2013 UTC
@@ -53,8 +53,8 @@
Handle<ByteArray> seeds(context->random_seed());
SetSeeds(seeds, state0, state1);
- Handle<Object> value =
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Handle<Object> value = Execution::Call(
+ context->GetIsolate(), fun, global, 0, NULL, &has_pending_exception);
CHECK(value->IsHeapNumber());
CHECK(fun->IsOptimized());
double crankshaft_value = HeapNumber::cast(*value)->value();
@@ -70,11 +70,12 @@
v8::V8::Initialize();
// Skip test if crankshaft is disabled.
if (!Isolate::Current()->use_crankshaft()) return;
- v8::Isolate* isolate = v8::Isolate::GetCurrent();
- v8::HandleScope scope(isolate);
- v8::Context::Scope context_scope(v8::Context::New(isolate));
+ v8::Isolate* v8_isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope scope(v8_isolate);
+ v8::Context::Scope context_scope(v8::Context::New(v8_isolate));
- Handle<Context> context(Isolate::Current()->context());
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
+ Handle<Context> context(isolate->context());
Handle<JSObject> global(context->global_object());
Handle<ByteArray> seeds(context->random_seed());
bool has_pending_exception;
@@ -88,8 +89,8 @@
Handle<JSFunction> fun(JSFunction::cast(fun_object->ToObjectChecked()));
// Optimize function.
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
+ Execution::Call(isolate, fun, global, 0, NULL, &has_pending_exception);
if (!fun->IsOptimized()) fun->MarkForLazyRecompilation();
// Test with some random values.
@@ -100,7 +101,7 @@
// Test that we bail out to runtime when seeds are uninitialized (zeros).
SetSeeds(seeds, 0, 0);
Handle<Object> value =
- Execution::Call(fun, global, 0, NULL, &has_pending_exception);
+ Execution::Call(isolate, fun, global, 0, NULL,
&has_pending_exception);
CHECK(value->IsHeapNumber());
CHECK(fun->IsOptimized());
double crankshaft_value = HeapNumber::cast(*value)->value();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.