OLD | NEW |
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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 Factory* factory = isolate()->factory(); | 489 Factory* factory = isolate()->factory(); |
490 Handle<Object> call_conv = factory->InternalizeUtf8String(name); | 490 Handle<Object> call_conv = factory->InternalizeUtf8String(name); |
491 Handle<Object> minor_key = factory->NewNumber(MinorKey()); | 491 Handle<Object> minor_key = factory->NewNumber(MinorKey()); |
492 Handle<Object> args[] = {call_conv, minor_key}; | 492 Handle<Object> args[] = {call_conv, minor_key}; |
493 MaybeHandle<Object> result = Execution::Call( | 493 MaybeHandle<Object> result = Execution::Call( |
494 isolate(), outer, factory->undefined_value(), 2, args, false); | 494 isolate(), outer, factory->undefined_value(), 2, args, false); |
495 Handle<JSFunction> inner = Handle<JSFunction>::cast(result.ToHandleChecked()); | 495 Handle<JSFunction> inner = Handle<JSFunction>::cast(result.ToHandleChecked()); |
496 // Just to make sure nobody calls this... | 496 // Just to make sure nobody calls this... |
497 inner->set_code(isolate()->builtins()->builtin(Builtins::kIllegal)); | 497 inner->set_code(isolate()->builtins()->builtin(Builtins::kIllegal)); |
498 | 498 |
499 Zone zone; | 499 return Compiler::GetStubCode(inner, this).ToHandleChecked(); |
500 // Build a "hybrid" CompilationInfo for a JSFunction/CodeStub pair. | |
501 ParseInfo parse_info(&zone, inner); | |
502 CompilationInfo info(&parse_info); | |
503 info.SetFunctionType(GetCallInterfaceDescriptor().GetFunctionType()); | |
504 info.MarkAsContextSpecializing(); | |
505 info.MarkAsDeoptimizationEnabled(); | |
506 info.SetStub(this); | |
507 return info.GenerateCodeStub(); | |
508 } | 500 } |
509 | 501 |
510 | 502 |
511 template<class StateType> | 503 template<class StateType> |
512 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { | 504 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { |
513 // Note: Although a no-op transition is semantically OK, it is hinting at a | 505 // Note: Although a no-op transition is semantically OK, it is hinting at a |
514 // bug somewhere in our state transition machinery. | 506 // bug somewhere in our state transition machinery. |
515 DCHECK(from != to); | 507 DCHECK(from != to); |
516 if (!FLAG_trace_ic) return; | 508 if (!FLAG_trace_ic) return; |
517 OFStream os(stdout); | 509 OFStream os(stdout); |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1083 | 1075 |
1084 if (type->Is(Type::UntaggedPointer())) { | 1076 if (type->Is(Type::UntaggedPointer())) { |
1085 return Representation::External(); | 1077 return Representation::External(); |
1086 } | 1078 } |
1087 | 1079 |
1088 DCHECK(!type->Is(Type::Untagged())); | 1080 DCHECK(!type->Is(Type::Untagged())); |
1089 return Representation::Tagged(); | 1081 return Representation::Tagged(); |
1090 } | 1082 } |
1091 } // namespace internal | 1083 } // namespace internal |
1092 } // namespace v8 | 1084 } // namespace v8 |
OLD | NEW |