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/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/conversions.h" | 9 #include "src/conversions.h" |
10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 base::SmartPointer<ParseInfo> info( | 246 base::SmartPointer<ParseInfo> info( |
247 location.function()->shared()->is_function() | 247 location.function()->shared()->is_function() |
248 ? new ParseInfo(&zone, location.function()) | 248 ? new ParseInfo(&zone, location.function()) |
249 : new ParseInfo(&zone, location.script())); | 249 : new ParseInfo(&zone, location.script())); |
250 | 250 |
251 if (!Parser::ParseStatic(info.get())) { | 251 if (!Parser::ParseStatic(info.get())) { |
252 isolate->clear_pending_exception(); | 252 isolate->clear_pending_exception(); |
253 return isolate->heap()->empty_string(); | 253 return isolate->heap()->empty_string(); |
254 } | 254 } |
255 CallPrinter printer(isolate, &zone); | 255 CallPrinter printer(isolate, &zone); |
256 const char* string = printer.Print(info->function(), location.start_pos()); | 256 const char* string = printer.Print(info->literal(), location.start_pos()); |
257 return *isolate->factory()->NewStringFromAsciiChecked(string); | 257 return *isolate->factory()->NewStringFromAsciiChecked(string); |
258 } | 258 } |
259 | 259 |
260 | 260 |
261 RUNTIME_FUNCTION(Runtime_MessageGetStartPosition) { | 261 RUNTIME_FUNCTION(Runtime_MessageGetStartPosition) { |
262 SealHandleScope shs(isolate); | 262 SealHandleScope shs(isolate); |
263 DCHECK(args.length() == 1); | 263 DCHECK(args.length() == 1); |
264 CONVERT_ARG_CHECKED(JSMessageObject, message, 0); | 264 CONVERT_ARG_CHECKED(JSMessageObject, message, 0); |
265 return Smi::FromInt(message->start_position()); | 265 return Smi::FromInt(message->start_position()); |
266 } | 266 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 } | 398 } |
399 | 399 |
400 | 400 |
401 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) { | 401 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) { |
402 HandleScope shs(isolate); | 402 HandleScope shs(isolate); |
403 return isolate->heap()->code_stub_exports_object(); | 403 return isolate->heap()->code_stub_exports_object(); |
404 } | 404 } |
405 | 405 |
406 } // namespace internal | 406 } // namespace internal |
407 } // namespace v8 | 407 } // namespace v8 |
OLD | NEW |