Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(879)

Side by Side Diff: src/stub-cache.cc

Issue 408183003: Express LoadIC extra ic state with LoadIC::State (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/stub-cache.h ('k') | src/x64/codegen-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 result->VerifyApiCallResultType(); 552 result->VerifyApiCallResultType();
553 return *v8::Utils::OpenHandle(*r); 553 return *v8::Utils::OpenHandle(*r);
554 } 554 }
555 } 555 }
556 556
557 return isolate->heap()->no_interceptor_result_sentinel(); 557 return isolate->heap()->no_interceptor_result_sentinel();
558 } 558 }
559 559
560 560
561 static Object* ThrowReferenceError(Isolate* isolate, Name* name) { 561 static Object* ThrowReferenceError(Isolate* isolate, Name* name) {
562 // If the load is non-contextual, just return the undefined result. 562 // If the load is inside typeof, just return the undefined result.
563 // Note that both keyed and non-keyed loads may end up here. 563 // Note that both keyed and non-keyed loads may end up here.
564 HandleScope scope(isolate); 564 HandleScope scope(isolate);
565 LoadIC ic(IC::NO_EXTRA_FRAME, isolate); 565 LoadIC ic(IC::NO_EXTRA_FRAME, isolate);
566 if (ic.contextual_mode() != CONTEXTUAL) { 566 if (ic.typeof_state() == INSIDE_TYPEOF) {
567 return isolate->heap()->undefined_value(); 567 return isolate->heap()->undefined_value();
568 } 568 }
569 569
570 // Throw a reference error. 570 // Throw a reference error.
571 Handle<Name> name_handle(name); 571 Handle<Name> name_handle(name);
572 Handle<Object> error = 572 Handle<Object> error =
573 isolate->factory()->NewReferenceError("not_defined", 573 isolate->factory()->NewReferenceError("not_defined",
574 HandleVector(&name_handle, 1)); 574 HandleVector(&name_handle, 1));
575 return isolate->Throw(*error); 575 return isolate->Throw(*error);
576 } 576 }
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 Handle<FunctionTemplateInfo>( 1433 Handle<FunctionTemplateInfo>(
1434 FunctionTemplateInfo::cast(signature->receiver())); 1434 FunctionTemplateInfo::cast(signature->receiver()));
1435 } 1435 }
1436 } 1436 }
1437 1437
1438 is_simple_api_call_ = true; 1438 is_simple_api_call_ = true;
1439 } 1439 }
1440 1440
1441 1441
1442 } } // namespace v8::internal 1442 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/x64/codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698