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

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

Issue 1197703002: Use big-boy Types to annotate interface descriptor parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Latest Created 5 years, 6 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/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 MaybeHandle<Object> result = Execution::Call( 495 MaybeHandle<Object> result = Execution::Call(
496 isolate(), outer, factory->undefined_value(), 2, args, false); 496 isolate(), outer, factory->undefined_value(), 2, args, false);
497 Handle<JSFunction> inner = Handle<JSFunction>::cast(result.ToHandleChecked()); 497 Handle<JSFunction> inner = Handle<JSFunction>::cast(result.ToHandleChecked());
498 // Just to make sure nobody calls this... 498 // Just to make sure nobody calls this...
499 inner->set_code(isolate()->builtins()->builtin(Builtins::kIllegal)); 499 inner->set_code(isolate()->builtins()->builtin(Builtins::kIllegal));
500 500
501 Zone zone; 501 Zone zone;
502 // Build a "hybrid" CompilationInfo for a JSFunction/CodeStub pair. 502 // Build a "hybrid" CompilationInfo for a JSFunction/CodeStub pair.
503 ParseInfo parse_info(&zone, inner); 503 ParseInfo parse_info(&zone, inner);
504 CompilationInfo info(&parse_info); 504 CompilationInfo info(&parse_info);
505 info.SetFunctionType(GetCallInterfaceDescriptor().GetFunctionType());
505 info.SetStub(this); 506 info.SetStub(this);
506 return info.GenerateCodeStub(); 507 return info.GenerateCodeStub();
507 } 508 }
508 509
509 510
510 template<class StateType> 511 template<class StateType>
511 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { 512 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) {
512 // Note: Although a no-op transition is semantically OK, it is hinting at a 513 // Note: Although a no-op transition is semantically OK, it is hinting at a
513 // bug somewhere in our state transition machinery. 514 // bug somewhere in our state transition machinery.
514 DCHECK(from != to); 515 DCHECK(from != to);
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1040 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1040 } 1041 }
1041 1042
1042 1043
1043 InternalArrayConstructorStub::InternalArrayConstructorStub( 1044 InternalArrayConstructorStub::InternalArrayConstructorStub(
1044 Isolate* isolate) : PlatformCodeStub(isolate) { 1045 Isolate* isolate) : PlatformCodeStub(isolate) {
1045 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1046 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1046 } 1047 }
1047 1048
1048 1049
1050 Representation RepresentationFromType(Type* type) {
1051 if (type->Is(Type::UntaggedSigned()) || type->Is(Type::UntaggedUnsigned())) {
1052 return Representation::Integer32();
1053 }
1054
1055 if (type->Is(Type::TaggedSigned())) {
1056 return Representation::Smi();
1057 }
1058
1059 if (type->Is(Type::UntaggedPointer())) {
1060 return Representation::External();
1061 }
1062
1063 DCHECK(!type->Is(Type::Untagged()));
1064 return Representation::Tagged();
1065 }
1049 } // namespace internal 1066 } // namespace internal
1050 } // namespace v8 1067 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698