OLD | NEW |
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/become.h" | 10 #include "vm/become.h" |
(...skipping 8669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8680 RawString* Script::GenerateSource() const { | 8680 RawString* Script::GenerateSource() const { |
8681 const TokenStream& token_stream = TokenStream::Handle(tokens()); | 8681 const TokenStream& token_stream = TokenStream::Handle(tokens()); |
8682 if (token_stream.IsNull()) { | 8682 if (token_stream.IsNull()) { |
8683 ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT); | 8683 ASSERT(Dart::snapshot_kind() == Snapshot::kAppNoJIT); |
8684 return String::null(); | 8684 return String::null(); |
8685 } | 8685 } |
8686 return token_stream.GenerateSource(); | 8686 return token_stream.GenerateSource(); |
8687 } | 8687 } |
8688 | 8688 |
8689 | 8689 |
| 8690 void Script::set_compile_time_constants(const Array& value) const { |
| 8691 StorePointer(&raw_ptr()->compile_time_constants_, value.raw()); |
| 8692 } |
| 8693 |
| 8694 |
8690 RawGrowableObjectArray* Script::GenerateLineNumberArray() const { | 8695 RawGrowableObjectArray* Script::GenerateLineNumberArray() const { |
8691 Zone* zone = Thread::Current()->zone(); | 8696 Zone* zone = Thread::Current()->zone(); |
8692 const GrowableObjectArray& info = | 8697 const GrowableObjectArray& info = |
8693 GrowableObjectArray::Handle(zone, GrowableObjectArray::New()); | 8698 GrowableObjectArray::Handle(zone, GrowableObjectArray::New()); |
8694 const String& source = String::Handle(zone, Source()); | 8699 const String& source = String::Handle(zone, Source()); |
8695 const String& key = Symbols::Empty(); | 8700 const String& key = Symbols::Empty(); |
8696 const Object& line_separator = Object::Handle(zone); | 8701 const Object& line_separator = Object::Handle(zone); |
8697 const TokenStream& tkns = TokenStream::Handle(zone, tokens()); | 8702 const TokenStream& tkns = TokenStream::Handle(zone, tokens()); |
8698 Smi& value = Smi::Handle(zone); | 8703 Smi& value = Smi::Handle(zone); |
8699 String& tokenValue = String::Handle(zone); | 8704 String& tokenValue = String::Handle(zone); |
(...skipping 13968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22668 return UserTag::null(); | 22673 return UserTag::null(); |
22669 } | 22674 } |
22670 | 22675 |
22671 | 22676 |
22672 const char* UserTag::ToCString() const { | 22677 const char* UserTag::ToCString() const { |
22673 const String& tag_label = String::Handle(label()); | 22678 const String& tag_label = String::Handle(label()); |
22674 return tag_label.ToCString(); | 22679 return tag_label.ToCString(); |
22675 } | 22680 } |
22676 | 22681 |
22677 } // namespace dart | 22682 } // namespace dart |
OLD | NEW |