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

Side by Side Diff: src/code-stubs.cc

Issue 1353723002: [runtime] Initial step towards switching Execution::Call to callable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handle sloppy mode api functions correctly. Created 5 years, 3 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
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/execution.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/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 // Get the outer ("stub generator") function. 482 // Get the outer ("stub generator") function.
483 const char* name = CodeStub::MajorName(MajorKey()); 483 const char* name = CodeStub::MajorName(MajorKey());
484 Handle<JSFunction> outer = GetFunction(isolate(), name); 484 Handle<JSFunction> outer = GetFunction(isolate(), name);
485 DCHECK_EQ(2, outer->shared()->length()); 485 DCHECK_EQ(2, outer->shared()->length());
486 486
487 // Invoke the outer function to get the stub itself. 487 // Invoke the outer function to get the stub itself.
488 Factory* factory = isolate()->factory(); 488 Factory* factory = isolate()->factory();
489 Handle<Object> call_conv = factory->InternalizeUtf8String(name); 489 Handle<Object> call_conv = factory->InternalizeUtf8String(name);
490 Handle<Object> minor_key = factory->NewNumber(MinorKey()); 490 Handle<Object> minor_key = factory->NewNumber(MinorKey());
491 Handle<Object> args[] = {call_conv, minor_key}; 491 Handle<Object> args[] = {call_conv, minor_key};
492 MaybeHandle<Object> result = Execution::Call( 492 MaybeHandle<Object> result =
493 isolate(), outer, factory->undefined_value(), 2, args, false); 493 Execution::Call(isolate(), outer, factory->undefined_value(), 2, args);
494 Handle<JSFunction> inner = Handle<JSFunction>::cast(result.ToHandleChecked()); 494 Handle<JSFunction> inner = Handle<JSFunction>::cast(result.ToHandleChecked());
495 // Just to make sure nobody calls this... 495 // Just to make sure nobody calls this...
496 inner->set_code(isolate()->builtins()->builtin(Builtins::kIllegal)); 496 inner->set_code(isolate()->builtins()->builtin(Builtins::kIllegal));
497 497
498 return Compiler::GetStubCode(inner, this).ToHandleChecked(); 498 return Compiler::GetStubCode(inner, this).ToHandleChecked();
499 } 499 }
500 500
501 501
502 template<class StateType> 502 template<class StateType>
503 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { 503 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) {
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 1050
1051 if (type->Is(Type::UntaggedPointer())) { 1051 if (type->Is(Type::UntaggedPointer())) {
1052 return Representation::External(); 1052 return Representation::External();
1053 } 1053 }
1054 1054
1055 DCHECK(!type->Is(Type::Untagged())); 1055 DCHECK(!type->Is(Type::Untagged()));
1056 return Representation::Tagged(); 1056 return Representation::Tagged();
1057 } 1057 }
1058 } // namespace internal 1058 } // namespace internal
1059 } // namespace v8 1059 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/execution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698