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

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

Issue 299263005: More reduction of accessing TLS by caching/passing isolate value. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/parser.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 (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 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 11071 matching lines...) Expand 10 before | Expand all | Expand 10 after
11082 intptr_t ICData::GetClassIdAt(intptr_t index, intptr_t arg_nr) const { 11082 intptr_t ICData::GetClassIdAt(intptr_t index, intptr_t arg_nr) const {
11083 GrowableArray<intptr_t> class_ids; 11083 GrowableArray<intptr_t> class_ids;
11084 Function& target = Function::Handle(); 11084 Function& target = Function::Handle();
11085 GetCheckAt(index, &class_ids, &target); 11085 GetCheckAt(index, &class_ids, &target);
11086 return class_ids[arg_nr]; 11086 return class_ids[arg_nr];
11087 } 11087 }
11088 11088
11089 11089
11090 intptr_t ICData::GetReceiverClassIdAt(intptr_t index) const { 11090 intptr_t ICData::GetReceiverClassIdAt(intptr_t index) const {
11091 ASSERT(index < NumberOfChecks()); 11091 ASSERT(index < NumberOfChecks());
11092 const Array& data = Array::Handle(ic_data());
11093 const intptr_t data_pos = index * TestEntryLength(); 11092 const intptr_t data_pos = index * TestEntryLength();
11094 return Smi::Value(Smi::RawCast(data.At(data_pos))); 11093 NoGCScope no_gc;
11094 RawArray* raw_data = ic_data();
11095 return Smi::Value(Smi::RawCast(raw_data->ptr()->data()[data_pos]));
11095 } 11096 }
11096 11097
11097 11098
11098 RawFunction* ICData::GetTargetAt(intptr_t index) const { 11099 RawFunction* ICData::GetTargetAt(intptr_t index) const {
11099 const intptr_t data_pos = index * TestEntryLength() + NumArgsTested(); 11100 const intptr_t data_pos = index * TestEntryLength() + NumArgsTested();
11100 ASSERT(Object::Handle(Array::Handle(ic_data()).At(data_pos)).IsFunction()); 11101 ASSERT(Object::Handle(Array::Handle(ic_data()).At(data_pos)).IsFunction());
11101 11102
11102 NoGCScope no_gc; 11103 NoGCScope no_gc;
11103 RawArray* raw_data = ic_data(); 11104 RawArray* raw_data = ic_data();
11104 return reinterpret_cast<RawFunction*>(raw_data->ptr()->data()[data_pos]); 11105 return reinterpret_cast<RawFunction*>(raw_data->ptr()->data()[data_pos]);
(...skipping 7804 matching lines...) Expand 10 before | Expand all | Expand 10 after
18909 return tag_label.ToCString(); 18910 return tag_label.ToCString();
18910 } 18911 }
18911 18912
18912 18913
18913 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 18914 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
18914 Instance::PrintJSONImpl(stream, ref); 18915 Instance::PrintJSONImpl(stream, ref);
18915 } 18916 }
18916 18917
18917 18918
18918 } // namespace dart 18919 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698