| Index: src/crankshaft/hydrogen.cc
|
| diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
|
| index ca84e747d4800e0d4624e15affd0743b1d4929f9..4a735b449448f7f1c4e6f408204e0db94884916f 100644
|
| --- a/src/crankshaft/hydrogen.cc
|
| +++ b/src/crankshaft/hydrogen.cc
|
| @@ -1373,13 +1373,15 @@ int HGraphBuilder::TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
|
| SourcePosition position) {
|
| DCHECK(info_->is_tracking_positions());
|
|
|
| + Isolate* isolate = shared->GetIsolate();
|
| int inline_id = static_cast<int>(graph()->inlined_function_infos().size());
|
| HInlinedFunctionInfo info(shared->start_position());
|
| - if (!shared->script()->IsUndefined()) {
|
| - Handle<Script> script(Script::cast(shared->script()));
|
| + if (!shared->script()->IsUndefined(isolate)) {
|
| + Handle<Script> script(Script::cast(shared->script()), isolate);
|
|
|
| - if (FLAG_hydrogen_track_positions && !script->source()->IsUndefined()) {
|
| - CodeTracer::Scope tracing_scope(isolate()->GetCodeTracer());
|
| + if (FLAG_hydrogen_track_positions &&
|
| + !script->source()->IsUndefined(isolate)) {
|
| + CodeTracer::Scope tracing_scope(isolate->GetCodeTracer());
|
| Object* source_name = script->name();
|
| OFStream os(tracing_scope.file());
|
| os << "--- FUNCTION SOURCE (";
|
| @@ -1406,7 +1408,7 @@ int HGraphBuilder::TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
|
| graph()->inlined_function_infos().push_back(info);
|
|
|
| if (FLAG_hydrogen_track_positions && inline_id != 0) {
|
| - CodeTracer::Scope tracing_scope(isolate()->GetCodeTracer());
|
| + CodeTracer::Scope tracing_scope(isolate->GetCodeTracer());
|
| OFStream os(tracing_scope.file());
|
| os << "INLINE (" << shared->DebugName()->ToCString().get() << ") id{"
|
| << info_->optimization_id() << "," << inline_id << "} AS " << inline_id
|
| @@ -5832,7 +5834,7 @@ void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) {
|
|
|
| // If the values is not the hole, it will stay initialized,
|
| // so no need to generate a check.
|
| - if (*current_value == *isolate()->factory()->the_hole_value()) {
|
| + if (current_value->IsTheHole(isolate())) {
|
| return Bailout(kReferenceToUninitializedVariable);
|
| }
|
| HInstruction* result = New<HLoadNamedField>(
|
| @@ -6055,7 +6057,7 @@ void HOptimizedGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
|
| closure->literals()->literal(expr->literal_index()), isolate());
|
| Handle<AllocationSite> site;
|
| Handle<JSObject> boilerplate;
|
| - if (!literals_cell->IsUndefined()) {
|
| + if (!literals_cell->IsUndefined(isolate())) {
|
| // Retrieve the boilerplate
|
| site = Handle<AllocationSite>::cast(literals_cell);
|
| boilerplate = Handle<JSObject>(JSObject::cast(site->transition_info()),
|
| @@ -6173,7 +6175,7 @@ void HOptimizedGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
|
| Handle<Object> literals_cell(literals->literal(expr->literal_index()),
|
| isolate());
|
| Handle<JSObject> boilerplate_object;
|
| - if (!literals_cell->IsUndefined()) {
|
| + if (!literals_cell->IsUndefined(isolate())) {
|
| DCHECK(literals_cell->IsAllocationSite());
|
| site = Handle<AllocationSite>::cast(literals_cell);
|
| boilerplate_object = Handle<JSObject>(
|
| @@ -7014,7 +7016,7 @@ void HOptimizedGraphBuilder::HandleGlobalVariableAssignment(
|
|
|
| // If the values is not the hole, it will stay initialized,
|
| // so no need to generate a check.
|
| - if (*current_value == *isolate()->factory()->the_hole_value()) {
|
| + if (current_value->IsTheHole(isolate())) {
|
| return Bailout(kReferenceToUninitializedVariable);
|
| }
|
|
|
| @@ -9452,7 +9454,7 @@ bool HOptimizedGraphBuilder::TryInlineApiCall(
|
| }
|
| Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
|
| Handle<Object> call_data_obj(api_call_info->data(), isolate());
|
| - bool call_data_undefined = call_data_obj->IsUndefined();
|
| + bool call_data_undefined = call_data_obj->IsUndefined(isolate());
|
| HValue* call_data = Add<HConstant>(call_data_obj);
|
| ApiFunction fun(v8::ToCData<Address>(api_call_info->callback()));
|
| ExternalReference ref = ExternalReference(&fun,
|
|
|