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

Side by Side Diff: src/liveedit.cc

Issue 21256003: Reland "Compilation type and state allocate an unnecessary Smi on v8::Script" (r15940). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/isolate.cc ('k') | src/objects.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 // 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 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 1550
1551 Handle<String> original_source(String::cast(original->source())); 1551 Handle<String> original_source(String::cast(original->source()));
1552 Handle<Script> copy = isolate->factory()->NewScript(original_source); 1552 Handle<Script> copy = isolate->factory()->NewScript(original_source);
1553 1553
1554 copy->set_name(original->name()); 1554 copy->set_name(original->name());
1555 copy->set_line_offset(original->line_offset()); 1555 copy->set_line_offset(original->line_offset());
1556 copy->set_column_offset(original->column_offset()); 1556 copy->set_column_offset(original->column_offset());
1557 copy->set_data(original->data()); 1557 copy->set_data(original->data());
1558 copy->set_type(original->type()); 1558 copy->set_type(original->type());
1559 copy->set_context_data(original->context_data()); 1559 copy->set_context_data(original->context_data());
1560 copy->set_compilation_type(original->compilation_type());
1561 copy->set_eval_from_shared(original->eval_from_shared()); 1560 copy->set_eval_from_shared(original->eval_from_shared());
1562 copy->set_eval_from_instructions_offset( 1561 copy->set_eval_from_instructions_offset(
1563 original->eval_from_instructions_offset()); 1562 original->eval_from_instructions_offset());
1564 1563
1564 // Copy all the flags, but clear compilation state.
1565 copy->set_flags(original->flags());
1566 copy->set_compilation_state(Script::COMPILATION_STATE_INITIAL);
1567
1565 return copy; 1568 return copy;
1566 } 1569 }
1567 1570
1568 1571
1569 Object* LiveEdit::ChangeScriptSource(Handle<Script> original_script, 1572 Object* LiveEdit::ChangeScriptSource(Handle<Script> original_script,
1570 Handle<String> new_source, 1573 Handle<String> new_source,
1571 Handle<Object> old_script_name) { 1574 Handle<Object> old_script_name) {
1572 Isolate* isolate = original_script->GetIsolate(); 1575 Isolate* isolate = original_script->GetIsolate();
1573 Handle<Object> old_script_object; 1576 Handle<Object> old_script_object;
1574 if (old_script_name->IsString()) { 1577 if (old_script_name->IsString()) {
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 2127
2125 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { 2128 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) {
2126 return false; 2129 return false;
2127 } 2130 }
2128 2131
2129 #endif // ENABLE_DEBUGGER_SUPPORT 2132 #endif // ENABLE_DEBUGGER_SUPPORT
2130 2133
2131 2134
2132 2135
2133 } } // namespace v8::internal 2136 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698