| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 3736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3747 i::Vector<const char>(flags_buf, num_flags)); | 3747 i::Vector<const char>(flags_buf, num_flags)); |
| 3748 } | 3748 } |
| 3749 | 3749 |
| 3750 | 3750 |
| 3751 Local<v8::RegExp> v8::RegExp::New(Handle<String> pattern, | 3751 Local<v8::RegExp> v8::RegExp::New(Handle<String> pattern, |
| 3752 Flags flags) { | 3752 Flags flags) { |
| 3753 EnsureInitialized("v8::RegExp::New()"); | 3753 EnsureInitialized("v8::RegExp::New()"); |
| 3754 LOG_API("RegExp::New"); | 3754 LOG_API("RegExp::New"); |
| 3755 ENTER_V8; | 3755 ENTER_V8; |
| 3756 EXCEPTION_PREAMBLE(); | 3756 EXCEPTION_PREAMBLE(); |
| 3757 i::Handle<i::String> flags_string = RegExpFlagsToString(flags); | 3757 i::Handle<i::JSRegExp> obj = i::Execution::NewJSRegExp( |
| 3758 i::Object** argv[2] = { | 3758 Utils::OpenHandle(*pattern), |
| 3759 i::Handle<i::Object>::cast(Utils::OpenHandle(*pattern)).location(), | 3759 RegExpFlagsToString(flags), |
| 3760 i::Handle<i::Object>::cast(flags_string).location() | |
| 3761 }; | |
| 3762 i::Handle<i::Object> obj = i::Execution::New( | |
| 3763 i::Handle<i::JSFunction>(i::Top::global_context()->regexp_function()), | |
| 3764 2, argv, | |
| 3765 &has_pending_exception); | 3760 &has_pending_exception); |
| 3766 EXCEPTION_BAILOUT_CHECK(Local<v8::RegExp>()); | 3761 EXCEPTION_BAILOUT_CHECK(Local<v8::RegExp>()); |
| 3767 return Utils::ToLocal(i::Handle<i::JSRegExp>::cast(obj)); | 3762 return Utils::ToLocal(i::Handle<i::JSRegExp>::cast(obj)); |
| 3768 } | 3763 } |
| 3769 | 3764 |
| 3770 | 3765 |
| 3771 Local<v8::String> v8::RegExp::GetSource() const { | 3766 Local<v8::String> v8::RegExp::GetSource() const { |
| 3772 if (IsDeadCheck("v8::RegExp::GetSource()")) return Local<v8::String>(); | 3767 if (IsDeadCheck("v8::RegExp::GetSource()")) return Local<v8::String>(); |
| 3773 i::Handle<i::JSRegExp> obj = Utils::OpenHandle(this); | 3768 i::Handle<i::JSRegExp> obj = Utils::OpenHandle(this); |
| 3774 return Utils::ToLocal(i::Handle<i::String>(obj->Pattern())); | 3769 return Utils::ToLocal(i::Handle<i::String>(obj->Pattern())); |
| (...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4974 | 4969 |
| 4975 | 4970 |
| 4976 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 4971 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 4977 HandleScopeImplementer* thread_local = | 4972 HandleScopeImplementer* thread_local = |
| 4978 reinterpret_cast<HandleScopeImplementer*>(storage); | 4973 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 4979 thread_local->IterateThis(v); | 4974 thread_local->IterateThis(v); |
| 4980 return storage + ArchiveSpacePerThread(); | 4975 return storage + ArchiveSpacePerThread(); |
| 4981 } | 4976 } |
| 4982 | 4977 |
| 4983 } } // namespace v8::internal | 4978 } } // namespace v8::internal |
| OLD | NEW |