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

Side by Side Diff: test/cctest/test-declarative-accessors.cc

Issue 12611004: fix windows build (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 DescriptorTestHelper* helper) { 196 DescriptorTestHelper* helper) {
197 v8::HandleScope handle_scope; 197 v8::HandleScope handle_scope;
198 int index = 13; 198 int index = 13;
199 int internal_field = 4; 199 int internal_field = 4;
200 v8::Handle<v8::RawOperationDescriptor> raw_descriptor = 200 v8::Handle<v8::RawOperationDescriptor> raw_descriptor =
201 OOD::NewInternalFieldDereference(helper->isolate_, internal_field) 201 OOD::NewInternalFieldDereference(helper->isolate_, internal_field)
202 ->NewRawShift(helper->isolate_, index*sizeof(T)); 202 ->NewRawShift(helper->isolate_, index*sizeof(T));
203 v8::Handle<v8::DeclaredAccessorDescriptor> descriptor; 203 v8::Handle<v8::DeclaredAccessorDescriptor> descriptor;
204 switch (sizeof(T)) { 204 switch (sizeof(T)) {
205 case 1: 205 case 1:
206 descriptor =raw_descriptor->NewBitmaskCompare8( 206 descriptor = raw_descriptor->NewBitmaskCompare8(
207 helper->isolate_, bitmask, compare_value); 207 helper->isolate_,
208 static_cast<uint8_t>(bitmask),
209 static_cast<uint8_t>(compare_value));
208 break; 210 break;
209 case 2: 211 case 2:
210 descriptor = raw_descriptor->NewBitmaskCompare16( 212 descriptor = raw_descriptor->NewBitmaskCompare16(
211 helper->isolate_, bitmask, compare_value); 213 helper->isolate_,
214 static_cast<uint16_t>(bitmask),
215 static_cast<uint16_t>(compare_value));
212 break; 216 break;
213 case 4: 217 case 4:
214 descriptor = raw_descriptor->NewBitmaskCompare32( 218 descriptor = raw_descriptor->NewBitmaskCompare32(
215 helper->isolate_, bitmask, compare_value); 219 helper->isolate_,
220 static_cast<uint32_t>(bitmask),
221 static_cast<uint32_t>(compare_value));
216 break; 222 break;
217 default: 223 default:
218 CHECK(false); 224 CHECK(false);
219 break; 225 break;
220 } 226 }
221 AlignedArray* array = *helper->array_; 227 AlignedArray* array = *helper->array_;
222 array->Reset(); 228 array->Reset();
223 VerifyRead(descriptor, internal_field, array, v8::False(helper->isolate_)); 229 VerifyRead(descriptor, internal_field, array, v8::False(helper->isolate_));
224 array->As<T*>()[index] = compare_value; 230 array->As<T*>()[index] = compare_value;
225 VerifyRead(descriptor, internal_field, array, v8::True(helper->isolate_)); 231 VerifyRead(descriptor, internal_field, array, v8::True(helper->isolate_));
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 OOD::NewInternalFieldDereference(helper.isolate_, internal_field) 292 OOD::NewInternalFieldDereference(helper.isolate_, internal_field)
287 ->NewRawShift(helper.isolate_, index*kPointerSize) 293 ->NewRawShift(helper.isolate_, index*kPointerSize)
288 ->NewHandleDereference(helper.isolate_); 294 ->NewHandleDereference(helper.isolate_);
289 HandleArray* array = *helper.handle_array_; 295 HandleArray* array = *helper.handle_array_;
290 v8::Handle<v8::String> expected = v8_str("whatever"); 296 v8::Handle<v8::String> expected = v8_str("whatever");
291 array->handles_[index] = v8::Persistent<v8::Value>::New(helper.isolate_, 297 array->handles_[index] = v8::Persistent<v8::Value>::New(helper.isolate_,
292 expected); 298 expected);
293 VerifyRead(descriptor, internal_field, array, expected); 299 VerifyRead(descriptor, internal_field, array, expected);
294 } 300 }
295 301
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