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

Side by Side Diff: src/runtime/runtime-internal.cc

Issue 1301583005: Rename ParserInfo::function() and CompilationInfo::function() to literal(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/rewriter.cc ('k') | src/scopes.cc » ('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 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
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
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
OLDNEW
« no previous file with comments | « src/rewriter.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698