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

Side by Side Diff: src/compiler.cc

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 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
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler/code-generator.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/asmjs/asm-js.h" 10 #include "src/asmjs/asm-js.h"
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 } 1301 }
1302 1302
1303 MaybeHandle<JSArray> Compiler::CompileForLiveEdit(Handle<Script> script) { 1303 MaybeHandle<JSArray> Compiler::CompileForLiveEdit(Handle<Script> script) {
1304 Isolate* isolate = script->GetIsolate(); 1304 Isolate* isolate = script->GetIsolate();
1305 DCHECK(AllowCompilation::IsAllowed(isolate)); 1305 DCHECK(AllowCompilation::IsAllowed(isolate));
1306 1306
1307 // In order to ensure that live edit function info collection finds the newly 1307 // In order to ensure that live edit function info collection finds the newly
1308 // generated shared function infos, clear the script's list temporarily 1308 // generated shared function infos, clear the script's list temporarily
1309 // and restore it at the end of this method. 1309 // and restore it at the end of this method.
1310 Handle<Object> old_function_infos(script->shared_function_infos(), isolate); 1310 Handle<Object> old_function_infos(script->shared_function_infos(), isolate);
1311 script->set_shared_function_infos(Smi::kZero); 1311 script->set_shared_function_infos(Smi::FromInt(0));
1312 1312
1313 // Start a compilation. 1313 // Start a compilation.
1314 Zone zone(isolate->allocator()); 1314 Zone zone(isolate->allocator());
1315 ParseInfo parse_info(&zone, script); 1315 ParseInfo parse_info(&zone, script);
1316 CompilationInfo info(&parse_info, Handle<JSFunction>::null()); 1316 CompilationInfo info(&parse_info, Handle<JSFunction>::null());
1317 info.MarkAsDebug(); 1317 info.MarkAsDebug();
1318 1318
1319 // TODO(635): support extensions. 1319 // TODO(635): support extensions.
1320 const bool compilation_succeeded = !CompileToplevel(&info).is_null(); 1320 const bool compilation_succeeded = !CompileToplevel(&info).is_null();
1321 Handle<JSArray> infos; 1321 Handle<JSArray> infos;
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 DCHECK(shared->is_compiled()); 1876 DCHECK(shared->is_compiled());
1877 function->set_literals(cached.literals); 1877 function->set_literals(cached.literals);
1878 } else if (shared->is_compiled()) { 1878 } else if (shared->is_compiled()) {
1879 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1879 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1880 JSFunction::EnsureLiterals(function); 1880 JSFunction::EnsureLiterals(function);
1881 } 1881 }
1882 } 1882 }
1883 1883
1884 } // namespace internal 1884 } // namespace internal
1885 } // namespace v8 1885 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698