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

Side by Side Diff: src/api.cc

Issue 10558005: Further extend TypedArray support in d8: (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Michael's comments. Created 8 years, 5 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 | « include/v8.h ('k') | src/d8.h » ('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 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 3013 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 memcpy(ptr, postfix, postfix_len * v8::internal::kCharSize); 3024 memcpy(ptr, postfix, postfix_len * v8::internal::kCharSize);
3025 3025
3026 // Copy the buffer into a heap-allocated string and return it. 3026 // Copy the buffer into a heap-allocated string and return it.
3027 Local<String> result = v8::String::New(buf.start(), buf_len); 3027 Local<String> result = v8::String::New(buf.start(), buf_len);
3028 return result; 3028 return result;
3029 } 3029 }
3030 } 3030 }
3031 } 3031 }
3032 3032
3033 3033
3034 Local<Value> v8::Object::GetConstructor() {
3035 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3036 ON_BAILOUT(isolate, "v8::Object::GetConstructor()",
3037 return Local<v8::Function>());
3038 ENTER_V8(isolate);
3039 i::Handle<i::JSObject> self = Utils::OpenHandle(this);
3040 i::Handle<i::Object> constructor(self->GetConstructor());
3041 return Utils::ToLocal(constructor);
3042 }
3043
3044
3034 Local<String> v8::Object::GetConstructorName() { 3045 Local<String> v8::Object::GetConstructorName() {
3035 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3046 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3036 ON_BAILOUT(isolate, "v8::Object::GetConstructorName()", 3047 ON_BAILOUT(isolate, "v8::Object::GetConstructorName()",
3037 return Local<v8::String>()); 3048 return Local<v8::String>());
3038 ENTER_V8(isolate); 3049 ENTER_V8(isolate);
3039 i::Handle<i::JSObject> self = Utils::OpenHandle(this); 3050 i::Handle<i::JSObject> self = Utils::OpenHandle(this);
3040 i::Handle<i::String> name(self->constructor_name()); 3051 i::Handle<i::String> name(self->constructor_name());
3041 return Utils::ToLocal(name); 3052 return Utils::ToLocal(name);
3042 } 3053 }
3043 3054
(...skipping 3357 matching lines...) Expand 10 before | Expand all | Expand 10 after
6401 6412
6402 6413
6403 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6414 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6404 HandleScopeImplementer* scope_implementer = 6415 HandleScopeImplementer* scope_implementer =
6405 reinterpret_cast<HandleScopeImplementer*>(storage); 6416 reinterpret_cast<HandleScopeImplementer*>(storage);
6406 scope_implementer->IterateThis(v); 6417 scope_implementer->IterateThis(v);
6407 return storage + ArchiveSpacePerThread(); 6418 return storage + ArchiveSpacePerThread();
6408 } 6419 }
6409 6420
6410 } } // namespace v8::internal 6421 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/d8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698