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

Side by Side Diff: src/runtime.cc

Issue 212553008: Add Bogus initialization for external_elements_kind and fixed_elements_kind (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | 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 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 CONVERT_ARG_HANDLE_CHECKED(Object, length_obj, 3); 1037 CONVERT_ARG_HANDLE_CHECKED(Object, length_obj, 3);
1038 1038
1039 ASSERT(holder->GetInternalFieldCount() == 1039 ASSERT(holder->GetInternalFieldCount() ==
1040 v8::ArrayBufferView::kInternalFieldCount); 1040 v8::ArrayBufferView::kInternalFieldCount);
1041 for (int i = 0; i < v8::ArrayBufferView::kInternalFieldCount; i++) { 1041 for (int i = 0; i < v8::ArrayBufferView::kInternalFieldCount; i++) {
1042 holder->SetInternalField(i, Smi::FromInt(0)); 1042 holder->SetInternalField(i, Smi::FromInt(0));
1043 } 1043 }
1044 1044
1045 ExternalArrayType array_type = kExternalInt8Array; // Bogus initialization. 1045 ExternalArrayType array_type = kExternalInt8Array; // Bogus initialization.
1046 size_t element_size = 1; // Bogus initialization. 1046 size_t element_size = 1; // Bogus initialization.
1047 ElementsKind external_elements_kind; 1047 ElementsKind external_elements_kind = EXTERNAL_INT8_ELEMENTS;
Dmitry Lomov (no reviews) 2014/03/27 11:18:49 Add "// Bogus initialization."
haitao.feng 2014/03/27 11:54:11 No more space in this line. Only "// Bogus" added.
1048 ElementsKind fixed_elements_kind; 1048 ElementsKind fixed_elements_kind = INT8_ELEMENTS;
1049 Runtime::ArrayIdToTypeAndSize(arrayId, 1049 Runtime::ArrayIdToTypeAndSize(arrayId,
1050 &array_type, 1050 &array_type,
1051 &external_elements_kind, 1051 &external_elements_kind,
1052 &fixed_elements_kind, 1052 &fixed_elements_kind,
1053 &element_size); 1053 &element_size);
1054 1054
1055 Handle<JSArrayBuffer> buffer = isolate->factory()->NewJSArrayBuffer(); 1055 Handle<JSArrayBuffer> buffer = isolate->factory()->NewJSArrayBuffer();
1056 if (source->IsJSTypedArray() && 1056 if (source->IsJSTypedArray() &&
1057 JSTypedArray::cast(*source)->type() == array_type) { 1057 JSTypedArray::cast(*source)->type() == array_type) {
1058 length_obj = Handle<Object>(JSTypedArray::cast(*source)->length(), isolate); 1058 length_obj = Handle<Object>(JSTypedArray::cast(*source)->length(), isolate);
(...skipping 14115 matching lines...) Expand 10 before | Expand all | Expand 10 after
15174 } 15174 }
15175 } 15175 }
15176 15176
15177 15177
15178 void Runtime::OutOfMemory() { 15178 void Runtime::OutOfMemory() {
15179 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); 15179 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true);
15180 UNREACHABLE(); 15180 UNREACHABLE();
15181 } 15181 }
15182 15182
15183 } } // namespace v8::internal 15183 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698