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

Side by Side Diff: src/compiler.cc

Issue 652027: Basic implementation of liveedit feature (Closed)
Patch Set: add proper source headers Created 10 years, 9 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/compiler.h ('k') | src/debug.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 checker.Check(info); 110 checker.Check(info);
111 if (checker.has_supported_syntax()) { 111 if (checker.has_supported_syntax()) {
112 return FastCodeGenerator::MakeCode(info); 112 return FastCodeGenerator::MakeCode(info);
113 } 113 }
114 } 114 }
115 115
116 return CodeGenerator::MakeCode(info); 116 return CodeGenerator::MakeCode(info);
117 } 117 }
118 118
119 119
120 #ifdef ENABLE_DEBUGGER_SUPPORT
121 Handle<Code> MakeCodeForLiveEdit(CompilationInfo* info) {
122 Handle<Context> context = Handle<Context>::null();
123 return MakeCode(context, info);
124 }
125 #endif
126
127
120 static Handle<JSFunction> MakeFunction(bool is_global, 128 static Handle<JSFunction> MakeFunction(bool is_global,
121 bool is_eval, 129 bool is_eval,
122 Compiler::ValidationState validate, 130 Compiler::ValidationState validate,
123 Handle<Script> script, 131 Handle<Script> script,
124 Handle<Context> context, 132 Handle<Context> context,
125 v8::Extension* extension, 133 v8::Extension* extension,
126 ScriptDataImpl* pre_data) { 134 ScriptDataImpl* pre_data) {
127 CompilationZoneScope zone_scope(DELETE_ON_EXIT); 135 CompilationZoneScope zone_scope(DELETE_ON_EXIT);
128 136
129 PostponeInterruptsScope postpone; 137 PostponeInterruptsScope postpone;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position()); 225 ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position());
218 Compiler::SetFunctionInfo(fun, lit, true, script); 226 Compiler::SetFunctionInfo(fun, lit, true, script);
219 227
220 // Hint to the runtime system used when allocating space for initial 228 // Hint to the runtime system used when allocating space for initial
221 // property space by setting the expected number of properties for 229 // property space by setting the expected number of properties for
222 // the instances of the function. 230 // the instances of the function.
223 SetExpectedNofPropertiesFromEstimate(fun, lit->expected_property_count()); 231 SetExpectedNofPropertiesFromEstimate(fun, lit->expected_property_count());
224 232
225 #ifdef ENABLE_DEBUGGER_SUPPORT 233 #ifdef ENABLE_DEBUGGER_SUPPORT
226 // Notify debugger 234 // Notify debugger
227 Debugger::OnAfterCompile(script, fun); 235 Debugger::OnAfterCompile(script, Debugger::NO_AFTER_COMPILE_FLAGS);
228 #endif 236 #endif
229 237
230 return fun; 238 return fun;
231 } 239 }
232 240
233 241
234 static StaticResource<SafeStringInputBuffer> safe_string_input_buffer; 242 static StaticResource<SafeStringInputBuffer> safe_string_input_buffer;
235 243
236 244
237 Handle<JSFunction> Compiler::Compile(Handle<String> source, 245 Handle<JSFunction> Compiler::Compile(Handle<String> source,
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 LOG(CodeCreateEvent(tag, *code, *func_name)); 571 LOG(CodeCreateEvent(tag, *code, *func_name));
564 OProfileAgent::CreateNativeCodeRegion(*func_name, 572 OProfileAgent::CreateNativeCodeRegion(*func_name,
565 code->instruction_start(), 573 code->instruction_start(),
566 code->instruction_size()); 574 code->instruction_size());
567 } 575 }
568 } 576 }
569 } 577 }
570 #endif 578 #endif
571 579
572 } } // namespace v8::internal 580 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | src/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698