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

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

Issue 1290933002: Toward precompiled snapshots. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 // It is only meaningful to interptret range feedback stored in the ICData 1999 // It is only meaningful to interptret range feedback stored in the ICData
2000 // when all checks are Mint or Smi. 2000 // when all checks are Mint or Smi.
2001 bool HasRangeFeedback() const; 2001 bool HasRangeFeedback() const;
2002 RangeFeedback DecodeRangeFeedbackAt(intptr_t idx) const; 2002 RangeFeedback DecodeRangeFeedbackAt(intptr_t idx) const;
2003 2003
2004 void PrintToJSONArray(const JSONArray& jsarray, 2004 void PrintToJSONArray(const JSONArray& jsarray,
2005 intptr_t token_pos, 2005 intptr_t token_pos,
2006 bool is_static_call) const; 2006 bool is_static_call) const;
2007 2007
2008 private: 2008 private:
2009 static RawICData* New();
2010
2009 RawArray* ic_data() const { 2011 RawArray* ic_data() const {
2010 return raw_ptr()->ic_data_; 2012 return raw_ptr()->ic_data_;
2011 } 2013 }
2012 2014
2013 void set_owner(const Function& value) const; 2015 void set_owner(const Function& value) const;
2014 void set_target_name(const String& value) const; 2016 void set_target_name(const String& value) const;
2015 void set_arguments_descriptor(const Array& value) const; 2017 void set_arguments_descriptor(const Array& value) const;
2016 void set_deopt_id(intptr_t value) const; 2018 void set_deopt_id(intptr_t value) const;
2017 void SetNumArgsTested(intptr_t value) const; 2019 void SetNumArgsTested(intptr_t value) const;
2018 void set_ic_data(const Array& value) const; 2020 void set_ic_data(const Array& value) const;
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
4369 static RawCode* LookupCodeInIsolate(Isolate* isolate, uword pc); 4371 static RawCode* LookupCodeInIsolate(Isolate* isolate, uword pc);
4370 4372
4371 // New is a private method as RawInstruction and RawCode objects should 4373 // New is a private method as RawInstruction and RawCode objects should
4372 // only be created using the Code::FinalizeCode method. This method creates 4374 // only be created using the Code::FinalizeCode method. This method creates
4373 // the RawInstruction and RawCode objects, sets up the pointer offsets 4375 // the RawInstruction and RawCode objects, sets up the pointer offsets
4374 // and links the two in a GC safe manner. 4376 // and links the two in a GC safe manner.
4375 static RawCode* New(intptr_t pointer_offsets_length); 4377 static RawCode* New(intptr_t pointer_offsets_length);
4376 4378
4377 FINAL_HEAP_OBJECT_IMPLEMENTATION(Code, Object); 4379 FINAL_HEAP_OBJECT_IMPLEMENTATION(Code, Object);
4378 friend class Class; 4380 friend class Class;
4381 friend class SnapshotWriter;
4379 4382
4380 // So that the RawFunction pointer visitor can determine whether code the 4383 // So that the RawFunction pointer visitor can determine whether code the
4381 // function points to is optimized. 4384 // function points to is optimized.
4382 friend class RawFunction; 4385 friend class RawFunction;
4383 }; 4386 };
4384 4387
4385 4388
4386 class Context : public Object { 4389 class Context : public Object {
4387 public: 4390 public:
4388 RawContext* parent() const { return raw_ptr()->parent_; } 4391 RawContext* parent() const { return raw_ptr()->parent_; }
(...skipping 3646 matching lines...) Expand 10 before | Expand all | Expand 10 after
8035 8038
8036 8039
8037 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8040 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8038 intptr_t index) { 8041 intptr_t index) {
8039 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8042 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8040 } 8043 }
8041 8044
8042 } // namespace dart 8045 } // namespace dart
8043 8046
8044 #endif // VM_OBJECT_H_ 8047 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698