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

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

Issue 2437593003: [IC] IC::GetSharedFunctionInfo does not need to skip bytecode handler frames. (Closed)
Patch Set: Addresses comments from Ross. 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 | « no previous file | no next file » | 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/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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 return UNINITIALIZED; 243 return UNINITIALIZED;
244 } 244 }
245 } 245 }
246 246
247 SharedFunctionInfo* IC::GetSharedFunctionInfo() const { 247 SharedFunctionInfo* IC::GetSharedFunctionInfo() const {
248 // Compute the JavaScript frame for the frame pointer of this IC 248 // Compute the JavaScript frame for the frame pointer of this IC
249 // structure. We need this to be able to find the function 249 // structure. We need this to be able to find the function
250 // corresponding to the frame. 250 // corresponding to the frame.
251 StackFrameIterator it(isolate()); 251 StackFrameIterator it(isolate());
252 while (it.frame()->fp() != this->fp()) it.Advance(); 252 while (it.frame()->fp() != this->fp()) it.Advance();
253 if (it.frame()->type() == StackFrame::STUB) {
254 // We might need to advance over bytecode handler frame for Ignition.
255 it.Advance();
256 }
257 JavaScriptFrame* frame = JavaScriptFrame::cast(it.frame()); 253 JavaScriptFrame* frame = JavaScriptFrame::cast(it.frame());
258 // Find the function on the stack and both the active code for the 254 // Find the function on the stack and both the active code for the
259 // function and the original code. 255 // function and the original code.
260 JSFunction* function = frame->function(); 256 JSFunction* function = frame->function();
261 return function->shared(); 257 return function->shared();
262 } 258 }
263 259
264 260
265 Code* IC::GetCode() const { 261 Code* IC::GetCode() const {
266 HandleScope scope(isolate()); 262 HandleScope scope(isolate());
(...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after
3069 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); 3065 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state());
3070 it.Next(); 3066 it.Next();
3071 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 3067 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
3072 Object::GetProperty(&it)); 3068 Object::GetProperty(&it));
3073 } 3069 }
3074 3070
3075 return *result; 3071 return *result;
3076 } 3072 }
3077 } // namespace internal 3073 } // namespace internal
3078 } // namespace v8 3074 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698