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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 2793163002: Do not embed is_auto_setup_scope into the compilation of native calls. (Closed)
Patch Set: . Created 3 years, 8 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_
6 #define RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ 6 #define RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 3380 matching lines...) Expand 10 before | Expand all | Expand 10 after
3391 token_pos_(node->token_pos()) {} 3391 token_pos_(node->token_pos()) {}
3392 3392
3393 NativeCallInstr(const String* name, 3393 NativeCallInstr(const String* name,
3394 const Function* function, 3394 const Function* function,
3395 bool link_lazily, 3395 bool link_lazily,
3396 TokenPosition position) 3396 TokenPosition position)
3397 : native_name_(name), 3397 : native_name_(name),
3398 function_(function), 3398 function_(function),
3399 native_c_function_(NULL), 3399 native_c_function_(NULL),
3400 is_bootstrap_native_(false), 3400 is_bootstrap_native_(false),
3401 is_auto_scope_(true),
3401 link_lazily_(link_lazily), 3402 link_lazily_(link_lazily),
3402 token_pos_(position) {} 3403 token_pos_(position) {}
3403 3404
3404 DECLARE_INSTRUCTION(NativeCall) 3405 DECLARE_INSTRUCTION(NativeCall)
3405 3406
3406 const String& native_name() const { return *native_name_; } 3407 const String& native_name() const { return *native_name_; }
3407 const Function& function() const { return *function_; } 3408 const Function& function() const { return *function_; }
3408 NativeFunction native_c_function() const { return native_c_function_; } 3409 NativeFunction native_c_function() const { return native_c_function_; }
3409 bool is_bootstrap_native() const { return is_bootstrap_native_; } 3410 bool is_bootstrap_native() const { return is_bootstrap_native_; }
3411 bool is_auto_scope() const { return is_auto_scope_; }
3410 bool link_lazily() const { return link_lazily_; } 3412 bool link_lazily() const { return link_lazily_; }
3411 virtual TokenPosition token_pos() const { return token_pos_; } 3413 virtual TokenPosition token_pos() const { return token_pos_; }
3412 3414
3413 virtual bool ComputeCanDeoptimize() const { return false; } 3415 virtual bool ComputeCanDeoptimize() const { return false; }
3414 3416
3415 virtual EffectSet Effects() const { return EffectSet::All(); } 3417 virtual EffectSet Effects() const { return EffectSet::All(); }
3416 3418
3417 void SetupNative(); 3419 void SetupNative();
3418 3420
3419 PRINT_OPERANDS_TO_SUPPORT 3421 PRINT_OPERANDS_TO_SUPPORT
3420 3422
3421 private: 3423 private:
3422 void set_native_c_function(NativeFunction value) { 3424 void set_native_c_function(NativeFunction value) {
3423 native_c_function_ = value; 3425 native_c_function_ = value;
3424 } 3426 }
3425 3427
3426 void set_is_bootstrap_native(bool value) { is_bootstrap_native_ = value; } 3428 void set_is_bootstrap_native(bool value) { is_bootstrap_native_ = value; }
3429 void set_is_auto_scope(bool value) { is_auto_scope_ = value; }
3427 3430
3428 const String* native_name_; 3431 const String* native_name_;
3429 const Function* function_; 3432 const Function* function_;
3430 NativeFunction native_c_function_; 3433 NativeFunction native_c_function_;
3431 bool is_bootstrap_native_; 3434 bool is_bootstrap_native_;
3435 bool is_auto_scope_;
3432 bool link_lazily_; 3436 bool link_lazily_;
3433 const TokenPosition token_pos_; 3437 const TokenPosition token_pos_;
3434 3438
3435 DISALLOW_COPY_AND_ASSIGN(NativeCallInstr); 3439 DISALLOW_COPY_AND_ASSIGN(NativeCallInstr);
3436 }; 3440 };
3437 3441
3438 3442
3439 class DebugStepCheckInstr : public TemplateInstruction<0, NoThrow> { 3443 class DebugStepCheckInstr : public TemplateInstruction<0, NoThrow> {
3440 public: 3444 public:
3441 DebugStepCheckInstr(TokenPosition token_pos, RawPcDescriptors::Kind stub_kind) 3445 DebugStepCheckInstr(TokenPosition token_pos, RawPcDescriptors::Kind stub_kind)
(...skipping 4597 matching lines...) Expand 10 before | Expand all | Expand 10 after
8039 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8043 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8040 UNIMPLEMENTED(); \ 8044 UNIMPLEMENTED(); \
8041 return NULL; \ 8045 return NULL; \
8042 } \ 8046 } \
8043 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8047 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8044 8048
8045 8049
8046 } // namespace dart 8050 } // namespace dart
8047 8051
8048 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ 8052 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698