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

Side by Side Diff: src/liveedit.cc

Issue 3561012: More refactoring of class Compiler's interface. (Closed)
Patch Set: Reindent some code, change some copyright dates. Created 10 years, 2 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 } 397 }
398 398
399 399
400 static void CompileScriptForTracker(Handle<Script> script) { 400 static void CompileScriptForTracker(Handle<Script> script) {
401 // TODO(635): support extensions. 401 // TODO(635): support extensions.
402 PostponeInterruptsScope postpone; 402 PostponeInterruptsScope postpone;
403 403
404 // Build AST. 404 // Build AST.
405 CompilationInfo info(script); 405 CompilationInfo info(script);
406 info.MarkAsGlobal(); 406 info.MarkAsGlobal();
407 if (!Parser::Parse(&info)) return; 407 if (Parser::Parse(&info)) {
408 408 // Compile the code.
409 // Compile the code. 409 LiveEditFunctionTracker tracker(info.function());
410 LiveEditFunctionTracker tracker(info.function()); 410 if (Compiler::MakeCodeForLiveEdit(&info)) {
411 Handle<Code> code = MakeCodeForLiveEdit(&info); 411 ASSERT(!info.code().is_null());
412 412 tracker.RecordRootFunctionInfo(info.code());
413 // Check for stack-overflow exceptions. 413 } else {
414 if (code.is_null()) { 414 Top::StackOverflow();
415 Top::StackOverflow(); 415 }
416 return;
417 } 416 }
418 tracker.RecordRootFunctionInfo(code);
419 } 417 }
420 418
421 419
422 // Unwraps JSValue object, returning its field "value" 420 // Unwraps JSValue object, returning its field "value"
423 static Handle<Object> UnwrapJSValue(Handle<JSValue> jsValue) { 421 static Handle<Object> UnwrapJSValue(Handle<JSValue> jsValue) {
424 return Handle<Object>(jsValue->value()); 422 return Handle<Object>(jsValue->value());
425 } 423 }
426 424
427 425
428 // Wraps any object into a OpaqueReference, that will hide the object 426 // Wraps any object into a OpaqueReference, that will hide the object
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 1469
1472 bool LiveEditFunctionTracker::IsActive() { 1470 bool LiveEditFunctionTracker::IsActive() {
1473 return false; 1471 return false;
1474 } 1472 }
1475 1473
1476 #endif // ENABLE_DEBUGGER_SUPPORT 1474 #endif // ENABLE_DEBUGGER_SUPPORT
1477 1475
1478 1476
1479 1477
1480 } } // namespace v8::internal 1478 } } // namespace v8::internal
OLDNEW
« src/compiler.h ('K') | « src/ia32/codegen-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698