| OLD | NEW | 
|---|
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" | 
| 6 | 6 | 
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" | 
| 8 #include "src/ast/prettyprinter.h" | 8 #include "src/ast/prettyprinter.h" | 
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" | 
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" | 
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 388     Object* script = fun->shared()->script(); | 388     Object* script = fun->shared()->script(); | 
| 389     if (script->IsScript() && | 389     if (script->IsScript() && | 
| 390         !(Script::cast(script)->source()->IsUndefined())) { | 390         !(Script::cast(script)->source()->IsUndefined())) { | 
| 391       Handle<Script> casted_script(Script::cast(script)); | 391       Handle<Script> casted_script(Script::cast(script)); | 
| 392       // Compute the location from the function and the relocation info of the | 392       // Compute the location from the function and the relocation info of the | 
| 393       // baseline code. For optimized code this will use the deoptimization | 393       // baseline code. For optimized code this will use the deoptimization | 
| 394       // information to get canonical location information. | 394       // information to get canonical location information. | 
| 395       List<FrameSummary> frames(FLAG_max_inlining_levels + 1); | 395       List<FrameSummary> frames(FLAG_max_inlining_levels + 1); | 
| 396       it.frame()->Summarize(&frames); | 396       it.frame()->Summarize(&frames); | 
| 397       FrameSummary& summary = frames.last(); | 397       FrameSummary& summary = frames.last(); | 
| 398       int pos = summary.code()->SourcePosition(summary.pc()); | 398       int pos = summary.abstract_code()->SourcePosition(summary.code_offset()); | 
| 399       *target = MessageLocation(casted_script, pos, pos + 1, handle(fun)); | 399       *target = MessageLocation(casted_script, pos, pos + 1, handle(fun)); | 
| 400       return true; | 400       return true; | 
| 401     } | 401     } | 
| 402   } | 402   } | 
| 403   return false; | 403   return false; | 
| 404 } | 404 } | 
| 405 | 405 | 
| 406 | 406 | 
| 407 Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) { | 407 Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) { | 
| 408   MessageLocation location; | 408   MessageLocation location; | 
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 472 RUNTIME_FUNCTION(Runtime_IncrementUseCounter) { | 472 RUNTIME_FUNCTION(Runtime_IncrementUseCounter) { | 
| 473   HandleScope scope(isolate); | 473   HandleScope scope(isolate); | 
| 474   DCHECK_EQ(1, args.length()); | 474   DCHECK_EQ(1, args.length()); | 
| 475   CONVERT_SMI_ARG_CHECKED(counter, 0); | 475   CONVERT_SMI_ARG_CHECKED(counter, 0); | 
| 476   isolate->CountUsage(static_cast<v8::Isolate::UseCounterFeature>(counter)); | 476   isolate->CountUsage(static_cast<v8::Isolate::UseCounterFeature>(counter)); | 
| 477   return isolate->heap()->undefined_value(); | 477   return isolate->heap()->undefined_value(); | 
| 478 } | 478 } | 
| 479 | 479 | 
| 480 }  // namespace internal | 480 }  // namespace internal | 
| 481 }  // namespace v8 | 481 }  // namespace v8 | 
| OLD | NEW | 
|---|