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

Side by Side Diff: src/isolate.cc

Issue 1331603002: Use baseline code to compute message locations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix RobustSubStringStub. 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/full-codegen/x87/full-codegen-x87.cc ('k') | src/scopes.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/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 1259
1260 1260
1261 bool Isolate::ComputeLocation(MessageLocation* target) { 1261 bool Isolate::ComputeLocation(MessageLocation* target) {
1262 StackTraceFrameIterator it(this); 1262 StackTraceFrameIterator it(this);
1263 if (!it.done()) { 1263 if (!it.done()) {
1264 JavaScriptFrame* frame = it.frame(); 1264 JavaScriptFrame* frame = it.frame();
1265 JSFunction* fun = frame->function(); 1265 JSFunction* fun = frame->function();
1266 Object* script = fun->shared()->script(); 1266 Object* script = fun->shared()->script();
1267 if (script->IsScript() && 1267 if (script->IsScript() &&
1268 !(Script::cast(script)->source()->IsUndefined())) { 1268 !(Script::cast(script)->source()->IsUndefined())) {
1269 int pos = frame->LookupCode()->SourcePosition(frame->pc());
1270 // Compute the location from the function and the reloc info.
1271 Handle<Script> casted_script(Script::cast(script)); 1269 Handle<Script> casted_script(Script::cast(script));
1270 // Compute the location from the function and the relocation info of the
1271 // baseline code. For optimized code this will use the deoptimization
1272 // information to get canonical location information.
1273 List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
1274 it.frame()->Summarize(&frames);
1275 FrameSummary& summary = frames.last();
1276 int pos = summary.code()->SourcePosition(summary.pc());
1272 *target = MessageLocation(casted_script, pos, pos + 1, handle(fun)); 1277 *target = MessageLocation(casted_script, pos, pos + 1, handle(fun));
1273 return true; 1278 return true;
1274 } 1279 }
1275 } 1280 }
1276 return false; 1281 return false;
1277 } 1282 }
1278 1283
1279 1284
1280 bool Isolate::ComputeLocationFromException(MessageLocation* target, 1285 bool Isolate::ComputeLocationFromException(MessageLocation* target,
1281 Handle<Object> exception) { 1286 Handle<Object> exception) {
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2817 // Then check whether this scope intercepts. 2822 // Then check whether this scope intercepts.
2818 if ((flag & intercept_mask_)) { 2823 if ((flag & intercept_mask_)) {
2819 intercepted_flags_ |= flag; 2824 intercepted_flags_ |= flag;
2820 return true; 2825 return true;
2821 } 2826 }
2822 return false; 2827 return false;
2823 } 2828 }
2824 2829
2825 } // namespace internal 2830 } // namespace internal
2826 } // namespace v8 2831 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698