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

Side by Side Diff: src/compiler.cc

Issue 490173002: Take ast node id counting away from Isolate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 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/compiler.h ('k') | src/isolate.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 // 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 26 matching lines...) Expand all
37 if (!IsAligned(reinterpret_cast<intptr_t>(data), kPointerAlignment)) { 37 if (!IsAligned(reinterpret_cast<intptr_t>(data), kPointerAlignment)) {
38 byte* copy = NewArray<byte>(length); 38 byte* copy = NewArray<byte>(length);
39 DCHECK(IsAligned(reinterpret_cast<intptr_t>(copy), kPointerAlignment)); 39 DCHECK(IsAligned(reinterpret_cast<intptr_t>(copy), kPointerAlignment));
40 CopyBytes(copy, data, length); 40 CopyBytes(copy, data, length);
41 data_ = copy; 41 data_ = copy;
42 AcquireDataOwnership(); 42 AcquireDataOwnership();
43 } 43 }
44 } 44 }
45 45
46 46
47 CompilationInfo::CompilationInfo(Handle<Script> script, 47 CompilationInfo::CompilationInfo(Handle<Script> script, Zone* zone)
48 Zone* zone)
49 : flags_(StrictModeField::encode(SLOPPY)), 48 : flags_(StrictModeField::encode(SLOPPY)),
50 script_(script), 49 script_(script),
51 osr_ast_id_(BailoutId::None()), 50 osr_ast_id_(BailoutId::None()),
52 parameter_count_(0), 51 parameter_count_(0),
53 this_has_uses_(true), 52 this_has_uses_(true),
54 optimization_id_(-1), 53 optimization_id_(-1),
55 ast_value_factory_(NULL), 54 ast_value_factory_(NULL),
56 ast_value_factory_owned_(false) { 55 ast_value_factory_owned_(false) {
57 Initialize(script->GetIsolate(), BASE, zone); 56 Initialize(script->GetIsolate(), BASE, zone);
58 } 57 }
(...skipping 20 matching lines...) Expand all
79 osr_ast_id_(BailoutId::None()), 78 osr_ast_id_(BailoutId::None()),
80 parameter_count_(0), 79 parameter_count_(0),
81 this_has_uses_(true), 80 this_has_uses_(true),
82 optimization_id_(-1), 81 optimization_id_(-1),
83 ast_value_factory_(NULL), 82 ast_value_factory_(NULL),
84 ast_value_factory_owned_(false) { 83 ast_value_factory_owned_(false) {
85 Initialize(script_->GetIsolate(), BASE, zone); 84 Initialize(script_->GetIsolate(), BASE, zone);
86 } 85 }
87 86
88 87
89 CompilationInfo::CompilationInfo(Handle<JSFunction> closure, 88 CompilationInfo::CompilationInfo(Handle<JSFunction> closure, Zone* zone)
90 Zone* zone)
91 : flags_(StrictModeField::encode(SLOPPY) | IsLazy::encode(true)), 89 : flags_(StrictModeField::encode(SLOPPY) | IsLazy::encode(true)),
92 closure_(closure), 90 closure_(closure),
93 shared_info_(Handle<SharedFunctionInfo>(closure->shared())), 91 shared_info_(Handle<SharedFunctionInfo>(closure->shared())),
94 script_(Handle<Script>(Script::cast(shared_info_->script()))), 92 script_(Handle<Script>(Script::cast(shared_info_->script()))),
95 context_(closure->context()), 93 context_(closure->context()),
96 osr_ast_id_(BailoutId::None()), 94 osr_ast_id_(BailoutId::None()),
97 parameter_count_(0), 95 parameter_count_(0),
98 this_has_uses_(true), 96 this_has_uses_(true),
99 optimization_id_(-1), 97 optimization_id_(-1),
100 ast_value_factory_(NULL), 98 ast_value_factory_(NULL),
101 ast_value_factory_owned_(false) { 99 ast_value_factory_owned_(false) {
102 Initialize(script_->GetIsolate(), BASE, zone); 100 Initialize(script_->GetIsolate(), BASE, zone);
103 } 101 }
104 102
105 103
106 CompilationInfo::CompilationInfo(HydrogenCodeStub* stub, 104 CompilationInfo::CompilationInfo(HydrogenCodeStub* stub, Isolate* isolate,
107 Isolate* isolate,
108 Zone* zone) 105 Zone* zone)
109 : flags_(StrictModeField::encode(SLOPPY) | IsLazy::encode(true)), 106 : flags_(StrictModeField::encode(SLOPPY) | IsLazy::encode(true)),
110 osr_ast_id_(BailoutId::None()), 107 osr_ast_id_(BailoutId::None()),
111 parameter_count_(0), 108 parameter_count_(0),
112 this_has_uses_(true), 109 this_has_uses_(true),
113 optimization_id_(-1), 110 optimization_id_(-1),
114 ast_value_factory_(NULL), 111 ast_value_factory_(NULL),
115 ast_value_factory_owned_(false) { 112 ast_value_factory_owned_(false) {
116 Initialize(isolate, STUB, zone); 113 Initialize(isolate, STUB, zone);
117 code_stub_ = stub; 114 code_stub_ = stub;
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 AllowHandleDereference allow_deref; 1380 AllowHandleDereference allow_deref;
1384 bool tracing_on = info()->IsStub() 1381 bool tracing_on = info()->IsStub()
1385 ? FLAG_trace_hydrogen_stubs 1382 ? FLAG_trace_hydrogen_stubs
1386 : (FLAG_trace_hydrogen && 1383 : (FLAG_trace_hydrogen &&
1387 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1384 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1388 return (tracing_on && 1385 return (tracing_on &&
1389 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1386 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1390 } 1387 }
1391 1388
1392 } } // namespace v8::internal 1389 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698