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

Side by Side Diff: src/ic/ic.cc

Issue 2481433002: [Interpreter] Add IsInterpreted() to JSFunction and use to fix test-heap tests. (Closed)
Patch Set: Fix always-opt Created 4 years, 1 month 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/compiler.cc ('k') | src/objects.h » ('j') | src/objects.h » ('J')
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/ic/ic.h" 5 #include "src/ic/ic.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/api-arguments-inl.h" 10 #include "src/api-arguments-inl.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // marker = [fp_ + kMarkerOffset]; 108 // marker = [fp_ + kMarkerOffset];
109 // if marker is smi and marker.value == INTERNAL and 109 // if marker is smi and marker.value == INTERNAL and
110 // the frame's code == builtin(Builtins::kFunctionApply): 110 // the frame's code == builtin(Builtins::kFunctionApply):
111 // then print "apply from" and advance one frame 111 // then print "apply from" and advance one frame
112 112
113 Object* maybe_function = 113 Object* maybe_function =
114 Memory::Object_at(fp_ + JavaScriptFrameConstants::kFunctionOffset); 114 Memory::Object_at(fp_ + JavaScriptFrameConstants::kFunctionOffset);
115 if (maybe_function->IsJSFunction()) { 115 if (maybe_function->IsJSFunction()) {
116 JSFunction* function = JSFunction::cast(maybe_function); 116 JSFunction* function = JSFunction::cast(maybe_function);
117 int code_offset = 0; 117 int code_offset = 0;
118 if (function->code()->is_interpreter_trampoline_builtin()) { 118 if (function->IsInterpreted()) {
119 code_offset = InterpretedFrame::GetBytecodeOffset(fp()); 119 code_offset = InterpretedFrame::GetBytecodeOffset(fp());
120 } else { 120 } else {
121 code_offset = 121 code_offset =
122 static_cast<int>(pc() - function->code()->instruction_start()); 122 static_cast<int>(pc() - function->code()->instruction_start());
123 } 123 }
124 JavaScriptFrame::PrintFunctionAndOffset(function, function->abstract_code(), 124 JavaScriptFrame::PrintFunctionAndOffset(function, function->abstract_code(),
125 code_offset, stdout, true); 125 code_offset, stdout, true);
126 } 126 }
127 127
128 const char* modifier = ""; 128 const char* modifier = "";
(...skipping 3005 matching lines...) Expand 10 before | Expand all | Expand 10 after
3134 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); 3134 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state());
3135 it.Next(); 3135 it.Next();
3136 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 3136 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
3137 Object::GetProperty(&it)); 3137 Object::GetProperty(&it));
3138 } 3138 }
3139 3139
3140 return *result; 3140 return *result;
3141 } 3141 }
3142 } // namespace internal 3142 } // namespace internal
3143 } // namespace v8 3143 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/objects.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698