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

Unified Diff: runtime/vm/compiler.cc

Issue 1317753004: Eliminate LocalVarDescriptors in some corner cases (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 8b965308c38a6ccc0c019c2d751e70faccf1ea85..b7c15f26ab9e1a8fbd9e414b85fed17b9089c204 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -1277,14 +1277,6 @@ RawError* Compiler::CompileAllFunctions(const Class& cls) {
}
-static void CreateLocalVarDescriptors(const ParsedFunction& parsed_function) {
- const Function& func = parsed_function.function();
- LocalVarDescriptors& var_descs = LocalVarDescriptors::Handle();
- var_descs = parsed_function.node_sequence()->scope()->GetVarDescriptors(func);
- Code::Handle(func.unoptimized_code()).set_var_descriptors(var_descs);
-}
-
-
void Compiler::CompileStaticInitializer(const Field& field) {
ASSERT(field.is_static());
if (field.initializer() != Function::null()) {
@@ -1338,15 +1330,10 @@ RawObject* Compiler::EvaluateStaticInitializer(const Field& field) {
parsed_function,
false, // optimized
Isolate::kNoDeoptId);
- // Eagerly create local var descriptors.
- CreateLocalVarDescriptors(*parsed_function);
-
initializer = parsed_function->function().raw();
}
// Invoke the function to evaluate the expression.
- const Object& result = PassiveObject::Handle(
- DartEntry::InvokeFunction(initializer, Object::empty_array()));
- return result.raw();
+ return DartEntry::InvokeFunction(initializer, Object::empty_array());
} else {
Thread* const thread = Thread::Current();
Isolate* const isolate = thread->isolate();
@@ -1410,8 +1397,6 @@ RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
false,
Isolate::kNoDeoptId);
- // Eagerly create local var descriptors.
- CreateLocalVarDescriptors(*parsed_function);
const Object& result = PassiveObject::Handle(
DartEntry::InvokeFunction(func, Object::empty_array()));
return result.raw();
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698