OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 5608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5619 i_isolate->date_cache()->ResetDateCache(); | 5619 i_isolate->date_cache()->ResetDateCache(); |
5620 | 5620 |
5621 if (!i_isolate->eternal_handles()->Exists( | 5621 if (!i_isolate->eternal_handles()->Exists( |
5622 i::EternalHandles::DATE_CACHE_VERSION)) { | 5622 i::EternalHandles::DATE_CACHE_VERSION)) { |
5623 return; | 5623 return; |
5624 } | 5624 } |
5625 i::Handle<i::FixedArray> date_cache_version = | 5625 i::Handle<i::FixedArray> date_cache_version = |
5626 i::Handle<i::FixedArray>::cast(i_isolate->eternal_handles()->GetSingleton( | 5626 i::Handle<i::FixedArray>::cast(i_isolate->eternal_handles()->GetSingleton( |
5627 i::EternalHandles::DATE_CACHE_VERSION)); | 5627 i::EternalHandles::DATE_CACHE_VERSION)); |
5628 ASSERT_EQ(1, date_cache_version->length()); | 5628 ASSERT_EQ(1, date_cache_version->length()); |
5629 ASSERT(date_cache_version->get(0)->IsNumber()); | 5629 CHECK(date_cache_version->get(0)->IsSmi()); |
5630 date_cache_version->set(0, i::Smi::FromInt( | 5630 date_cache_version->set( |
5631 date_cache_version->get(0)->Number() + 1)); | 5631 0, |
| 5632 i::Smi::FromInt(i::Smi::cast(date_cache_version->get(0))->value() + 1)); |
5632 } | 5633 } |
5633 | 5634 |
5634 | 5635 |
5635 static i::Handle<i::String> RegExpFlagsToString(RegExp::Flags flags) { | 5636 static i::Handle<i::String> RegExpFlagsToString(RegExp::Flags flags) { |
5636 i::Isolate* isolate = i::Isolate::Current(); | 5637 i::Isolate* isolate = i::Isolate::Current(); |
5637 uint8_t flags_buf[3]; | 5638 uint8_t flags_buf[3]; |
5638 int num_flags = 0; | 5639 int num_flags = 0; |
5639 if ((flags & RegExp::kGlobal) != 0) flags_buf[num_flags++] = 'g'; | 5640 if ((flags & RegExp::kGlobal) != 0) flags_buf[num_flags++] = 'g'; |
5640 if ((flags & RegExp::kMultiline) != 0) flags_buf[num_flags++] = 'm'; | 5641 if ((flags & RegExp::kMultiline) != 0) flags_buf[num_flags++] = 'm'; |
5641 if ((flags & RegExp::kIgnoreCase) != 0) flags_buf[num_flags++] = 'i'; | 5642 if ((flags & RegExp::kIgnoreCase) != 0) flags_buf[num_flags++] = 'i'; |
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7329 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7330 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7330 Address callback_address = | 7331 Address callback_address = |
7331 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7332 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7332 VMState<EXTERNAL> state(isolate); | 7333 VMState<EXTERNAL> state(isolate); |
7333 ExternalCallbackScope call_scope(isolate, callback_address); | 7334 ExternalCallbackScope call_scope(isolate, callback_address); |
7334 callback(info); | 7335 callback(info); |
7335 } | 7336 } |
7336 | 7337 |
7337 | 7338 |
7338 } } // namespace v8::internal | 7339 } } // namespace v8::internal |
OLD | NEW |