| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 4197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4208 obj = tokens_iterator.CurrentToken(); | 4208 obj = tokens_iterator.CurrentToken(); |
| 4209 if (obj.IsSmi()) { | 4209 if (obj.IsSmi()) { |
| 4210 val = Smi::Cast(obj).Value(); | 4210 val = Smi::Cast(obj).Value(); |
| 4211 } else { | 4211 } else { |
| 4212 literal = tokens_iterator.MakeLiteralToken(obj); | 4212 literal = tokens_iterator.MakeLiteralToken(obj); |
| 4213 val = literal.Hash(); | 4213 val = literal.Hash(); |
| 4214 } | 4214 } |
| 4215 result = 31 * result + val; | 4215 result = 31 * result + val; |
| 4216 tokens_iterator.Advance(); | 4216 tokens_iterator.Advance(); |
| 4217 } | 4217 } |
| 4218 result = result & ((static_cast<intptr_t>(1) << 31) - 1); | 4218 result = result & ((static_cast<intptr_t>(1) << 30) - 1); |
| 4219 ASSERT(result <= static_cast<uint32_t>(kMaxInt32)); | 4219 ASSERT(result <= static_cast<uint32_t>(kMaxInt32)); |
| 4220 return result; | 4220 return result; |
| 4221 } | 4221 } |
| 4222 | 4222 |
| 4223 | 4223 |
| 4224 const char* Function::ToCString() const { | 4224 const char* Function::ToCString() const { |
| 4225 const char* static_str = is_static() ? " static" : ""; | 4225 const char* static_str = is_static() ? " static" : ""; |
| 4226 const char* abstract_str = is_abstract() ? " abstract" : ""; | 4226 const char* abstract_str = is_abstract() ? " abstract" : ""; |
| 4227 const char* kind_str = NULL; | 4227 const char* kind_str = NULL; |
| 4228 const char* const_str = is_const() ? " const" : ""; | 4228 const char* const_str = is_const() ? " const" : ""; |
| (...skipping 7963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12192 } | 12192 } |
| 12193 return result.raw(); | 12193 return result.raw(); |
| 12194 } | 12194 } |
| 12195 | 12195 |
| 12196 | 12196 |
| 12197 const char* WeakProperty::ToCString() const { | 12197 const char* WeakProperty::ToCString() const { |
| 12198 return "_WeakProperty"; | 12198 return "_WeakProperty"; |
| 12199 } | 12199 } |
| 12200 | 12200 |
| 12201 } // namespace dart | 12201 } // namespace dart |
| OLD | NEW |